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

This commit is contained in:
sharkdp 2019-02-18 19:53:14 +01:00 committed by David Peter
parent d8f28c177a
commit f0771d6532

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"));