1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-17 02:32:26 +01:00

Simplify and polish pager.rs and related code

This commit is contained in:
Martin Nordholts
2020-12-28 22:29:03 +01:00
parent cc0f8ca813
commit dcfe883f4b
4 changed files with 22 additions and 22 deletions

View File

@@ -52,6 +52,7 @@ impl OutputType {
use std::path::PathBuf;
use std::process::{Command, Stdio};
use crate::pager::*;
use crate::bat_warning;
let Pager { pager, source } = get_pager(pager_from_config);
@@ -67,7 +68,7 @@ impl OutputType {
}
if pager_path.file_stem() == Some(&OsString::from("most")) && source == PagerSource::PagerEnvVar {
eprintln!("WARNING: Ignoring PAGER=\"{}\": Coloring not supported. Override with BAT_PAGER=\"{}\" or --pager \"{}\"", pager, pager, pager);
bat_warning!("Ignoring PAGER=\"{}\": Coloring not supported. Override with BAT_PAGER=\"{}\" or --pager \"{}\"", pager, pager, pager);
return Ok(OutputType::stdout());
}