From 9342d0bb24a468238dd2f836de3c51032d9d4896 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Thu, 24 May 2018 20:17:19 +0200 Subject: [PATCH] Explicitly specify which args override themselves --- src/app.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index e7e554cc..a9fa243a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -40,7 +40,6 @@ impl App { .global_setting(AppSettings::DeriveDisplayOrder) .global_setting(AppSettings::UnifiedHelpMessage) .global_setting(AppSettings::NextLineHelp) - .global_setting(AppSettings::AllArgsOverrideSelf) .setting(AppSettings::InferSubcommands) .setting(AppSettings::ArgsNegateSubcommands) .setting(AppSettings::DisableHelpSubcommand) @@ -55,6 +54,7 @@ impl App { Arg::with_name("language") .short("l") .long("language") + .overrides_with("language") .help("Set the language for highlighting") .long_help( "Set the language for syntax highlighting. The language can be \ @@ -96,6 +96,7 @@ impl App { .arg( Arg::with_name("color") .long("color") + .overrides_with("color") .takes_value(true) .value_name("when") .possible_values(&["auto", "never", "always"]) @@ -105,6 +106,7 @@ impl App { .arg( Arg::with_name("paging") .long("paging") + .overrides_with("paging") .takes_value(true) .value_name("when") .possible_values(&["auto", "never", "always"]) @@ -115,6 +117,7 @@ impl App { .arg( Arg::with_name("wrap") .long("wrap") + .overrides_with("wrap") .takes_value(true) .value_name("mode") .possible_values(&["character", "never"]) @@ -130,6 +133,7 @@ impl App { .arg( Arg::with_name("theme") .long("theme") + .overrides_with("theme") .takes_value(true) .help("Set the theme for highlighting") .long_help( @@ -146,6 +150,7 @@ impl App { .arg( Arg::with_name("number") .long("number") + .overrides_with("number") .short("n") .conflicts_with("style") .help("Show line numbers (alias for '--style=numbers')")