on master help sign in
Added new alias for 'decoration=always'
commit565a80305ca045e40eb5ba4b2fa127eb9d63e027 authorAlexander Karlis <alexanderkarlis@gmail.com> dateSat 15 Aug 2020, 23:12 (6 years ago) parent57a8122
2 files changed+11−1
src/bin/bat/app.rs+2−1 src/bin/bat/clap_app.rs+9
src/bin/bat/app.rs+2−1
@@ -174,7 +174,8 @@ impl App {
174174 term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),
175175 loop_through: !(self.interactive_output
176176 || 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"))),
178179 tab_width: self
179180 .matches
180181 .value_of("tabs")
src/bin/bat/clap_app.rs+9
@@ -257,6 +257,15 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
257257 an interactive terminal is detected. Possible values: *auto*, never, always.",
258258 ),
259259 )
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+ )
260269 .arg(
261270 Arg::with_name("paging")
262271 .long("paging")