From 905c876106c554cfef0345971e71e62d4488725f Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 20 Oct 2022 10:10:38 -0400 Subject: [PATCH 1/2] fix(help): Use single quotes in -h/--help help Use single quotes around the strings `-h` and `--help` in help output. This is more consistent and improves readability a bit. --- .../tests/snapshots/sub_subcommands.elvish | 4 ++-- .../tests/snapshots/sub_subcommands.fish | 2 +- .../tests/snapshots/sub_subcommands.ps1 | 4 ++-- .../tests/snapshots/sub_subcommands.zsh | 4 ++-- .../tests/snapshots/possible_values.bash.roff | 2 +- .../tests/snapshots/value_env.bash.roff | 2 +- examples/tutorial_builder/04_01_enum.md | 4 ++-- examples/tutorial_derive/04_01_enum.md | 4 ++-- src/builder/command.rs | 4 ++-- tests/builder/help.rs | 20 +++++++++---------- tests/builder/hidden_args.rs | 8 ++++---- tests/derive/help.rs | 2 +- tests/ui/arg_required_else_help_stderr.toml | 2 +- tests/ui/h_flag_stdout.toml | 2 +- tests/ui/help_cmd_stdout.toml | 2 +- tests/ui/help_flag_stdout.toml | 2 +- 16 files changed, 34 insertions(+), 34 deletions(-) diff --git a/clap_complete/tests/snapshots/sub_subcommands.elvish b/clap_complete/tests/snapshots/sub_subcommands.elvish index d9c98a91429..807e2fb3d1d 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.elvish +++ b/clap_complete/tests/snapshots/sub_subcommands.elvish @@ -47,8 +47,8 @@ set edit:completion:arg-completer[my-app] = {|@words| } &'my-app;some_cmd;sub_cmd'= { cand --config 'the other case to test' - cand -h 'Print help information (use `--help` for more detail)' - cand --help 'Print help information (use `--help` for more detail)' + cand -h 'Print help information (use ''--help'' for more detail)' + cand --help 'Print help information (use ''--help'' for more detail)' cand -V 'Print version information' cand --version 'Print version information' } diff --git a/clap_complete/tests/snapshots/sub_subcommands.fish b/clap_complete/tests/snapshots/sub_subcommands.fish index 7add21c54c6..b3ed252d31e 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.fish +++ b/clap_complete/tests/snapshots/sub_subcommands.fish @@ -12,7 +12,7 @@ complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "sub_cmd" -d 'sub-subcommand' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -l config -d 'the other case to test' -r -f -a "{Lest quotes\, aren\'t escaped. help\,with\,comma,Second to trigger display of options }" -complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s h -l help -d 'Print help information (use `--help` for more detail)' +complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s h -l help -d 'Print help information (use \'--help\' for more detail)' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s V -l version -d 'Print version information' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from help; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "sub_cmd" -d 'sub-subcommand' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from help; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' diff --git a/clap_complete/tests/snapshots/sub_subcommands.ps1 b/clap_complete/tests/snapshots/sub_subcommands.ps1 index fb5602466e6..25054c89666 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.ps1 +++ b/clap_complete/tests/snapshots/sub_subcommands.ps1 @@ -53,8 +53,8 @@ Register-ArgumentCompleter -Native -CommandName 'my-app' -ScriptBlock { } 'my-app;some_cmd;sub_cmd' { [CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'the other case to test') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information (use `--help` for more detail)') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information (use `--help` for more detail)') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information (use ''--help'' for more detail)') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information (use ''--help'' for more detail)') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information') [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information') break diff --git a/clap_complete/tests/snapshots/sub_subcommands.zsh b/clap_complete/tests/snapshots/sub_subcommands.zsh index 7d853d5d4e8..1db3d56ddea 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.zsh +++ b/clap_complete/tests/snapshots/sub_subcommands.zsh @@ -63,8 +63,8 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--config=[the other case to test]: :((Lest\ quotes,\ aren'\''t\ escaped.\:"help,with,comma" Second\ to\ trigger\ display\ of\ options\:""))' \ -'-h[Print help information (use `--help` for more detail)]' \ -'--help[Print help information (use `--help` for more detail)]' \ +'-h[Print help information (use '\''--help'\'' for more detail)]' \ +'--help[Print help information (use '\''--help'\'' for more detail)]' \ '-V[Print version information]' \ '--version[Print version information]' \ && ret=0 diff --git a/clap_mangen/tests/snapshots/possible_values.bash.roff b/clap_mangen/tests/snapshots/possible_values.bash.roff index d4be2d2c9af..49d0f5082aa 100644 --- a/clap_mangen/tests/snapshots/possible_values.bash.roff +++ b/clap_mangen/tests/snapshots/possible_values.bash.roff @@ -25,7 +25,7 @@ slow: use the slow method .RE .TP /fB/-h/fR, /fB/-/-help/fR -Print help information (use `/-h` for a summary) +Print help information (use /*(Aq/-h/*(Aq for a summary) .TP [/fIpositional_choice/fR] Pick the Position you want the command to run in diff --git a/clap_mangen/tests/snapshots/value_env.bash.roff b/clap_mangen/tests/snapshots/value_env.bash.roff index 7e8966198f4..70918646e3f 100644 --- a/clap_mangen/tests/snapshots/value_env.bash.roff +++ b/clap_mangen/tests/snapshots/value_env.bash.roff @@ -15,4 +15,4 @@ May also be specified with the /fBCONFIG_FILE/fR environment variable. .RE .TP /fB/-h/fR, /fB/-/-help/fR -Print help information (use `/-h` for a summary) +Print help information (use /*(Aq/-h/*(Aq for a summary) diff --git a/examples/tutorial_builder/04_01_enum.md b/examples/tutorial_builder/04_01_enum.md index 7f1a0d1957f..29dd0dcc632 100644 --- a/examples/tutorial_builder/04_01_enum.md +++ b/examples/tutorial_builder/04_01_enum.md @@ -14,7 +14,7 @@ Arguments: Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -28,7 +28,7 @@ Arguments: What mode to run the program in [possible values: fast, slow] Options: - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information $ 04_01_enum fast diff --git a/examples/tutorial_derive/04_01_enum.md b/examples/tutorial_derive/04_01_enum.md index d208c8faeee..560df4e6695 100644 --- a/examples/tutorial_derive/04_01_enum.md +++ b/examples/tutorial_derive/04_01_enum.md @@ -14,7 +14,7 @@ Arguments: Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -28,7 +28,7 @@ Arguments: What mode to run the program in [possible values: fast, slow] Options: - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information $ 04_01_enum_derive fast diff --git a/src/builder/command.rs b/src/builder/command.rs index c4bab2c5aaa..fb009bf27b9 100644 --- a/src/builder/command.rs +++ b/src/builder/command.rs @@ -4241,8 +4241,8 @@ impl Command { .action(ArgAction::Help); if self.long_help_exists { arg = arg - .help("Print help information (use `--help` for more detail)") - .long_help("Print help information (use `-h` for a summary)"); + .help("Print help information (use '--help' for more detail)") + .long_help("Print help information (use '-h' for a summary)"); } else { arg = arg.help("Print help information"); } diff --git a/tests/builder/help.rs b/tests/builder/help.rs index 1bd8a2868e4..fa423d44c82 100644 --- a/tests/builder/help.rs +++ b/tests/builder/help.rs @@ -265,7 +265,7 @@ tests clap library Usage: clap-test Options: - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information some text that comes after the help @@ -279,7 +279,7 @@ Usage: clap-test Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -470,7 +470,7 @@ Options: - second: short help -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) "; let cmd = Command::new("test") .term_width(67) @@ -648,7 +648,7 @@ Options: A coffeehouse, coffee shop, or café. -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -990,7 +990,7 @@ Arguments: Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -1689,7 +1689,7 @@ does stuff Usage: test [OPTIONS] --song --song-volume Options: - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information OVERRIDE SPECIAL: @@ -1745,7 +1745,7 @@ Usage: ctest foo Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -1768,7 +1768,7 @@ About foo Usage: ctest foo Options: - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information "; @@ -1793,7 +1793,7 @@ Arguments: Options: -f - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) "; let cmd = Command::new("demo") @@ -1948,7 +1948,7 @@ Options: and on, so I'll stop now. -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) "; let cmd = Command::new("prog").arg( diff --git a/tests/builder/hidden_args.rs b/tests/builder/hidden_args.rs index 8f634321d32..6cb54103c6e 100644 --- a/tests/builder/hidden_args.rs +++ b/tests/builder/hidden_args.rs @@ -36,7 +36,7 @@ Usage: test [OPTIONS] Options: -v, --visible This text should be visible - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information "; @@ -80,7 +80,7 @@ Options: This text should be visible -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -117,7 +117,7 @@ Options: This text should be visible -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information @@ -154,7 +154,7 @@ Usage: test [OPTIONS] Options: -c, --config Some help text describing the --config arg -v, --visible This text should be visible - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information "; diff --git a/tests/derive/help.rs b/tests/derive/help.rs index 76d5ab6ed79..60a9d32a23f 100644 --- a/tests/derive/help.rs +++ b/tests/derive/help.rs @@ -400,7 +400,7 @@ Arguments: Options: -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) "; /// Application help diff --git a/tests/ui/arg_required_else_help_stderr.toml b/tests/ui/arg_required_else_help_stderr.toml index 91d2d6f9fca..044b81b80ad 100644 --- a/tests/ui/arg_required_else_help_stderr.toml +++ b/tests/ui/arg_required_else_help_stderr.toml @@ -11,6 +11,6 @@ Commands: Options: --verbose log - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information """ diff --git a/tests/ui/h_flag_stdout.toml b/tests/ui/h_flag_stdout.toml index 31dc5fe80fb..8ce39135132 100644 --- a/tests/ui/h_flag_stdout.toml +++ b/tests/ui/h_flag_stdout.toml @@ -10,7 +10,7 @@ Commands: Options: --verbose log - -h, --help Print help information (use `--help` for more detail) + -h, --help Print help information (use '--help' for more detail) -V, --version Print version information """ stderr = "" diff --git a/tests/ui/help_cmd_stdout.toml b/tests/ui/help_cmd_stdout.toml index 43b37e6e561..ba610fd98a9 100644 --- a/tests/ui/help_cmd_stdout.toml +++ b/tests/ui/help_cmd_stdout.toml @@ -15,7 +15,7 @@ Options: more log -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information diff --git a/tests/ui/help_flag_stdout.toml b/tests/ui/help_flag_stdout.toml index 437f479eabe..2a1816c39be 100644 --- a/tests/ui/help_flag_stdout.toml +++ b/tests/ui/help_flag_stdout.toml @@ -15,7 +15,7 @@ Options: more log -h, --help - Print help information (use `-h` for a summary) + Print help information (use '-h' for a summary) -V, --version Print version information From ec70e353fc4113d58efdf98af2661fad0385d9a2 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 20 Oct 2022 12:59:06 -0400 Subject: [PATCH 2/2] fix(help): Shorten --help help to shorten help Applications may want to constrain their short help to use the two-column format so the -h output is as compact as possible. They might do this by optimizing short help texts to fit within the right-hand column on 80-character terminals, and then providing long help texts with more info. However, c1c269b427 made the short help text for -h/--help much longer when the short and long help are different, forcing short help to wrap to the multiple-line format if medium-sized option/value names are used. Reword the short help for this case to be as compact as possible. The net length is still a few characters longer than in clap 3, but this still substantially increases the maximum width of the left column while continuing to document the difference between -h and --help. Fixes #4409 --- clap_complete/tests/snapshots/sub_subcommands.elvish | 4 ++-- clap_complete/tests/snapshots/sub_subcommands.fish | 2 +- clap_complete/tests/snapshots/sub_subcommands.ps1 | 4 ++-- clap_complete/tests/snapshots/sub_subcommands.zsh | 4 ++-- examples/tutorial_builder/04_01_enum.md | 2 +- examples/tutorial_derive/04_01_enum.md | 2 +- src/builder/command.rs | 4 +++- tests/builder/help.rs | 8 ++++---- tests/builder/hidden_args.rs | 4 ++-- tests/ui/arg_required_else_help_stderr.toml | 2 +- tests/ui/h_flag_stdout.toml | 2 +- 11 files changed, 20 insertions(+), 18 deletions(-) diff --git a/clap_complete/tests/snapshots/sub_subcommands.elvish b/clap_complete/tests/snapshots/sub_subcommands.elvish index 807e2fb3d1d..d871b8d2540 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.elvish +++ b/clap_complete/tests/snapshots/sub_subcommands.elvish @@ -47,8 +47,8 @@ set edit:completion:arg-completer[my-app] = {|@words| } &'my-app;some_cmd;sub_cmd'= { cand --config 'the other case to test' - cand -h 'Print help information (use ''--help'' for more detail)' - cand --help 'Print help information (use ''--help'' for more detail)' + cand -h 'Print help (''--help'' for more)' + cand --help 'Print help (''--help'' for more)' cand -V 'Print version information' cand --version 'Print version information' } diff --git a/clap_complete/tests/snapshots/sub_subcommands.fish b/clap_complete/tests/snapshots/sub_subcommands.fish index b3ed252d31e..7169073eb80 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.fish +++ b/clap_complete/tests/snapshots/sub_subcommands.fish @@ -12,7 +12,7 @@ complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "sub_cmd" -d 'sub-subcommand' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -l config -d 'the other case to test' -r -f -a "{Lest quotes\, aren\'t escaped. help\,with\,comma,Second to trigger display of options }" -complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s h -l help -d 'Print help information (use \'--help\' for more detail)' +complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s h -l help -d 'Print help (\'--help\' for more)' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s V -l version -d 'Print version information' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from help; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "sub_cmd" -d 'sub-subcommand' complete -c my-app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from help; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' diff --git a/clap_complete/tests/snapshots/sub_subcommands.ps1 b/clap_complete/tests/snapshots/sub_subcommands.ps1 index 25054c89666..79f0ba08318 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.ps1 +++ b/clap_complete/tests/snapshots/sub_subcommands.ps1 @@ -53,8 +53,8 @@ Register-ArgumentCompleter -Native -CommandName 'my-app' -ScriptBlock { } 'my-app;some_cmd;sub_cmd' { [CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'the other case to test') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information (use ''--help'' for more detail)') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information (use ''--help'' for more detail)') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (''--help'' for more)') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (''--help'' for more)') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information') [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information') break diff --git a/clap_complete/tests/snapshots/sub_subcommands.zsh b/clap_complete/tests/snapshots/sub_subcommands.zsh index 1db3d56ddea..1fa075727d8 100644 --- a/clap_complete/tests/snapshots/sub_subcommands.zsh +++ b/clap_complete/tests/snapshots/sub_subcommands.zsh @@ -63,8 +63,8 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--config=[the other case to test]: :((Lest\ quotes,\ aren'\''t\ escaped.\:"help,with,comma" Second\ to\ trigger\ display\ of\ options\:""))' \ -'-h[Print help information (use '\''--help'\'' for more detail)]' \ -'--help[Print help information (use '\''--help'\'' for more detail)]' \ +'-h[Print help ('\''--help'\'' for more)]' \ +'--help[Print help ('\''--help'\'' for more)]' \ '-V[Print version information]' \ '--version[Print version information]' \ && ret=0 diff --git a/examples/tutorial_builder/04_01_enum.md b/examples/tutorial_builder/04_01_enum.md index 29dd0dcc632..76f212cee89 100644 --- a/examples/tutorial_builder/04_01_enum.md +++ b/examples/tutorial_builder/04_01_enum.md @@ -28,7 +28,7 @@ Arguments: What mode to run the program in [possible values: fast, slow] Options: - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information $ 04_01_enum fast diff --git a/examples/tutorial_derive/04_01_enum.md b/examples/tutorial_derive/04_01_enum.md index 560df4e6695..11571b4152b 100644 --- a/examples/tutorial_derive/04_01_enum.md +++ b/examples/tutorial_derive/04_01_enum.md @@ -28,7 +28,7 @@ Arguments: What mode to run the program in [possible values: fast, slow] Options: - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information $ 04_01_enum_derive fast diff --git a/src/builder/command.rs b/src/builder/command.rs index fb009bf27b9..30f4b8ef9b5 100644 --- a/src/builder/command.rs +++ b/src/builder/command.rs @@ -4241,7 +4241,9 @@ impl Command { .action(ArgAction::Help); if self.long_help_exists { arg = arg - .help("Print help information (use '--help' for more detail)") + // keep this message brief, for applications that want to + // use the two-column short help format + .help("Print help ('--help' for more)") .long_help("Print help information (use '-h' for a summary)"); } else { arg = arg.help("Print help information"); diff --git a/tests/builder/help.rs b/tests/builder/help.rs index fa423d44c82..82f4463b4e8 100644 --- a/tests/builder/help.rs +++ b/tests/builder/help.rs @@ -265,7 +265,7 @@ tests clap library Usage: clap-test Options: - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information some text that comes after the help @@ -1689,7 +1689,7 @@ does stuff Usage: test [OPTIONS] --song --song-volume Options: - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information OVERRIDE SPECIAL: @@ -1768,7 +1768,7 @@ About foo Usage: ctest foo Options: - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information "; @@ -1793,7 +1793,7 @@ Arguments: Options: -f - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) "; let cmd = Command::new("demo") diff --git a/tests/builder/hidden_args.rs b/tests/builder/hidden_args.rs index 6cb54103c6e..d93b596567e 100644 --- a/tests/builder/hidden_args.rs +++ b/tests/builder/hidden_args.rs @@ -36,7 +36,7 @@ Usage: test [OPTIONS] Options: -v, --visible This text should be visible - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information "; @@ -154,7 +154,7 @@ Usage: test [OPTIONS] Options: -c, --config Some help text describing the --config arg -v, --visible This text should be visible - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information "; diff --git a/tests/ui/arg_required_else_help_stderr.toml b/tests/ui/arg_required_else_help_stderr.toml index 044b81b80ad..c274165417b 100644 --- a/tests/ui/arg_required_else_help_stderr.toml +++ b/tests/ui/arg_required_else_help_stderr.toml @@ -11,6 +11,6 @@ Commands: Options: --verbose log - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information """ diff --git a/tests/ui/h_flag_stdout.toml b/tests/ui/h_flag_stdout.toml index 8ce39135132..dea606f28aa 100644 --- a/tests/ui/h_flag_stdout.toml +++ b/tests/ui/h_flag_stdout.toml @@ -10,7 +10,7 @@ Commands: Options: --verbose log - -h, --help Print help information (use '--help' for more detail) + -h, --help Print help ('--help' for more) -V, --version Print version information """ stderr = ""