From 81771432fb5f5dccea1f52a2e394aba7d18f84e4 Mon Sep 17 00:00:00 2001 From: ms2300 Date: Sat, 25 Aug 2018 19:44:02 -0600 Subject: [PATCH] #212 : added -p as an alias for --style=plain --- src/app.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app.rs b/src/app.rs index f478bb42..d371cefc 100644 --- a/src/app.rs +++ b/src/app.rs @@ -170,6 +170,16 @@ impl App { components to display (e.g. 'numbers,changes,grid') or a \ pre-defined style ('full')", ), + ).arg( + Arg::with_name("plain") + .overrides_with("plain") + .short("p") + .conflicts_with("style") + .help("Show plain style (alias for '--style=plain').") + .long_help( + "Only show plain style, no decorations. This is an alias for \ + '--style=plain'", + ), ).arg( Arg::with_name("number") .long("number") @@ -384,6 +394,8 @@ impl App { HashSet::new() } else if matches.is_present("number") { [OutputComponent::Numbers].iter().cloned().collect() + } else if matches.is_present("plain") { + [OutputComponent::Plain].iter().cloned().collect() } else { values_t!(matches.values_of("style"), OutputComponent)? .into_iter()