mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
fix(help): Be consistent in long/short help
This commit is contained in:
parent
66d2bcbdd4
commit
9e5f93d43f
2 changed files with 16 additions and 8 deletions
|
@ -519,9 +519,9 @@ impl<'cmd, 'writer> HelpTemplate<'cmd, 'writer> {
|
|||
cmd: subcommand,
|
||||
styles: self.styles,
|
||||
usage: self.usage,
|
||||
next_line_help: false,
|
||||
next_line_help: self.next_line_help,
|
||||
term_w: self.term_w,
|
||||
use_long: false,
|
||||
use_long: self.use_long,
|
||||
};
|
||||
let args = subcommand
|
||||
.get_arguments()
|
||||
|
|
|
@ -3028,11 +3028,15 @@ Options:
|
|||
Print help (see a summary with '-h')
|
||||
|
||||
parent test:
|
||||
--child <child> foo
|
||||
-h, --help Print help (see more with '--help')
|
||||
--child <child>
|
||||
bar
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
parent help:
|
||||
[COMMAND]... Print help for the subcommand(s)
|
||||
[COMMAND]...
|
||||
Print help for the subcommand(s)
|
||||
";
|
||||
let cmd = Command::new("parent")
|
||||
.flatten_help(true)
|
||||
|
@ -3066,11 +3070,15 @@ Options:
|
|||
Print help (see a summary with '-h')
|
||||
|
||||
parent test:
|
||||
--child <child> foo
|
||||
-h, --help Print help (see more with '--help')
|
||||
--child <child>
|
||||
bar
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
parent help:
|
||||
[COMMAND]... Print help for the subcommand(s)
|
||||
[COMMAND]...
|
||||
Print help for the subcommand(s)
|
||||
";
|
||||
let cmd = Command::new("parent")
|
||||
.flatten_help(true)
|
||||
|
|
Loading…
Reference in a new issue