diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index bb74b873..0858f6aa 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -165,11 +165,14 @@ impl App { // There's no point in wrapping when this is the case. WrappingMode::NoWrapping }, - colored_output: match self.matches.value_of("color") { - Some("always") => true, - Some("never") => false, - Some("auto") | _ => env::var_os("NO_COLOR").is_none() && self.interactive_output, - }, + colored_output: self.matches.is_present("always-decorations") + || match self.matches.value_of("color") { + Some("always") => true, + Some("never") => false, + Some("auto") | _ => { + env::var_os("NO_COLOR").is_none() && self.interactive_output + } + }, paging_mode, term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize), loop_through: !(self.interactive_output @@ -285,6 +288,7 @@ impl App { fn style_components(&self) -> Result { let matches = &self.matches; + println!("{:#?}", matches); Ok(StyleComponents( if matches.value_of("decorations") == Some("never") { HashSet::new() diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index eed59a54..f6775ab5 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -259,12 +259,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { ) .arg( Arg::with_name("always-decorations") - .short("D") + .short("f") .alias("always-decor") .overrides_with("always-decorations") .hidden(true) .hidden_short_help(true) - .help("Alias for '--decorations=always'") + .help("Alias for '--decorations=always --color=always'") ) .arg( Arg::with_name("paging")