Fix format error

This commit is contained in:
Park Juhyung 2018-10-21 20:15:17 +09:00 committed by David Peter
parent 154186a58d
commit 9c782fb692
2 changed files with 4 additions and 4 deletions

View File

@ -220,7 +220,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.help("Set pager")
.long_help(
"Set which pager is used. This option will overwrite \
PAGER or BAT_PAGER environment variables.",
PAGER or BAT_PAGER environment variables.",
),
)
.arg(

View File

@ -26,9 +26,9 @@ impl OutputType {
/// Try to launch the pager. Fall back to stdout in case of errors.
fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result<Self> {
let pager_from_env = env::var("BAT_PAGER")
.or_else(|_| env::var("PAGER"));
let pager = pager_from_config.map(|p| p.to_string())
let pager_from_env = env::var("BAT_PAGER").or_else(|_| env::var("PAGER"));
let pager = pager_from_config
.map(|p| p.to_string())
.or(pager_from_env.ok())
.unwrap_or(String::from("less"));