on master help sign in
#212 : added -p as an alias for --style=plain
commit81771432fb5f5dccea1f52a2e394aba7d18f84e4 authorms2300 <matt.sewall@gmail.com> dateSat 25 Aug 2018, 19:44 (8 years ago) parent627181b
1 file changed+12
src/app.rs+12
src/app.rs+12
@@ -170,6 +170,16 @@ impl App {
170170 components to display (e.g. 'numbers,changes,grid') or a \
171171 pre-defined style ('full')",
172172 ),
173+ ).arg(
174+ Arg::with_name("plain")
175+ .overrides_with("plain")
176+ .short("p")
177+ .conflicts_with("style")
178+ .help("Show plain style (alias for '--style=plain').")
179+ .long_help(
180+ "Only show plain style, no decorations. This is an alias for \
181+ '--style=plain'",
182+ ),
173183 ).arg(
174184 Arg::with_name("number")
175185 .long("number")
@@ -384,6 +394,8 @@ impl App {
384394 HashSet::new()
385395 } else if matches.is_present("number") {
386396 [OutputComponent::Numbers].iter().cloned().collect()
397+ } else if matches.is_present("plain") {
398+ [OutputComponent::Plain].iter().cloned().collect()
387399 } else {
388400 values_t!(matches.values_of("style"), OutputComponent)?
389401 .into_iter()