summaryrefslogtreecommitdiffstats
path: root/src/utils/bat/output.rs
diff options
context:
space:
mode:
authorippsav <69125922+ippsav@users.noreply.github.com>2023-07-30 00:25:02 +0100
committerGitHub <noreply@github.com>2023-07-29 19:25:02 -0400
commit3c55764215feb54b09bc11ff445acf5ef23afe00 (patch)
tree820b8781d83c47817ea33864749bb1efaa46933f /src/utils/bat/output.rs
parentfdaf4bfe1d8b59b397b069429b48c655bfc358a8 (diff)
Fix issue where pager would be set to `more` or `most` (#1494)
fix pager env in case of `more/most`
Diffstat (limited to 'src/utils/bat/output.rs')
-rw-r--r--src/utils/bat/output.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/bat/output.rs b/src/utils/bat/output.rs
index ca062e1b..54373ef1 100644
--- a/src/utils/bat/output.rs
+++ b/src/utils/bat/output.rs
@@ -53,9 +53,8 @@ impl OutputType {
let mut replace_arguments_to_less = false;
let pager_from_env = match env.pagers.clone() {
- (Some(delta_pager), _, _) => Some(delta_pager),
- (_, Some(bat_pager), _) => Some(bat_pager),
- (_, _, Some(pager)) => {
+ (Some(delta_pager), _) => Some(delta_pager),
+ (_, Some(pager)) => {
// less needs to be called with the '-R' option in order to properly interpret ANSI
// color sequences. If someone has set PAGER="less -F", we therefore need to
// overwrite the arguments and add '-R'.