Do not replace arguments to pager when --pager is used, closes #509

This commit is contained in:
sharkdp authored and David Peter committed 2019-02-18 20:28:44 +01:00
1 parent d8f28c177a
commit f0771d6532
1 file changed
+6 -1
+6 -1
View File
@@ -43,8 +43,13 @@ impl OutputType {
_ => None,
};
let pager_from_config = pager_from_config.map(|p| p.to_string());
if pager_from_config.is_some() {
replace_arguments_to_less = false;
}
let pager = pager_from_config
.map(|p| p.to_string())
.or(pager_from_env)
.unwrap_or(String::from("less"));