From 9376a57d4033b2f394d44daeab35bddbeb34c320 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 7 Nov 2022 23:04:02 -0600 Subject: [PATCH] fix(help): Clarify that 'help' command accepts multiple Making this plural can go either way as - Clarify it is plural - This is all really to simulate actually doing subcommands and you only do one at a time For now, I lean towards clarifying it is plural I also tweaked the message to be more consistent with how `--help` and `-h` describe themselves. Fixes #4342 --- src/builder/command.rs | 2 +- tests/builder/help.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/builder/command.rs b/src/builder/command.rs index c4bab2c5aaa..a30221a7fe6 100644 --- a/src/builder/command.rs +++ b/src/builder/command.rs @@ -4287,7 +4287,7 @@ impl Command { .action(ArgAction::Append) .num_args(..) .value_name("COMMAND") - .help("The subcommand whose help message to display"), + .help("Print help for the subcommand(s)"), ) }; self._propagate_subcommand(&mut help_subcmd); diff --git a/tests/builder/help.rs b/tests/builder/help.rs index 400085e53f7..72dd3719878 100644 --- a/tests/builder/help.rs +++ b/tests/builder/help.rs @@ -1989,7 +1989,7 @@ Print this message or the help of the given subcommand(s) Usage: myapp help [COMMAND]... Arguments: - [COMMAND]... The subcommand whose help message to display + [COMMAND]... Print help for the subcommand(s) "; let cmd = Command::new("myapp") @@ -2006,7 +2006,7 @@ Print this message or the help of the given subcommand(s) Usage: myapp subcmd help [COMMAND]... Arguments: - [COMMAND]... The subcommand whose help message to display + [COMMAND]... Print help for the subcommand(s) "; let cmd = Command::new("myapp") @@ -2054,7 +2054,7 @@ Print this message or the help of the given subcommand(s) Usage: myapp help [COMMAND]... Arguments: - [COMMAND]... The subcommand whose help message to display + [COMMAND]... Print help for the subcommand(s) "; let cmd = Command::new("myapp") @@ -2561,7 +2561,7 @@ Print this message or the help of the given subcommand(s) Usage: example help [COMMAND]... Arguments: - [COMMAND]... The subcommand whose help message to display + [COMMAND]... Print help for the subcommand(s) ", false, ); @@ -2603,7 +2603,7 @@ Print this message or the help of the given subcommand(s) Usage: example help [COMMAND]... Arguments: - [COMMAND]... The subcommand whose help message to display + [COMMAND]... Print help for the subcommand(s) ", false, );