on master help sign in
Added new alias for 'decoration=always'
565a803Alexander Karlis
src/bin/bat/app.rs+2−1
@@ -174,7 +174,8 @@ impl App {
174 term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),
174 term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),
175 loop_through: !(self.interactive_output
175 loop_through: !(self.interactive_output
176 || self.matches.value_of("color") == Some("always")
176 || self.matches.value_of("color") == Some("always")
177− || self.matches.value_of("decorations") == Some("always")),
177+ || (self.matches.value_of("decorations") == Some("always")
178+ || self.matches.is_present("always-decorations"))),
178 tab_width: self
179 tab_width: self
179 .matches
180 .matches
180 .value_of("tabs")
181 .value_of("tabs")
src/bin/bat/clap_app.rs+9
@@ -257,6 +257,15 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
257 an interactive terminal is detected. Possible values: *auto*, never, always.",
257 an interactive terminal is detected. Possible values: *auto*, never, always.",
258 ),
258 ),
259 )
259 )
260+ .arg(
261+ Arg::with_name("always-decorations")
262+ .short("D")
263+ .alias("always-decor")
264+ .overrides_with("always-decorations")
265+ .hidden(true)
266+ .hidden_short_help(true)
267+ .help("Alias for '--decorations=always'")
268+ )
260 .arg(
269 .arg(
261 Arg::with_name("paging")
270 Arg::with_name("paging")
262 .long("paging")
271 .long("paging")