mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
fix: Switch sub-commands from multi-val to multi-occur
Similar to #2977, this changes positional argument `<subcmd>` in `help <subcmd>` to be multiple occurrences, from being multiple values. This is what identified the usage generation bug fixed in #2978 and was isolated into the test case `positional_multiple_occurrences_is_dotted`. This is part of #2692 where we re-evaluate the usage of multiple values for positionals now that we accept multiple occurrences.
This commit is contained in:
parent
acaa3645c3
commit
8212647bb3
1 changed files with 1 additions and 1 deletions
|
@ -923,7 +923,7 @@ impl<'help, 'app> Parser<'help, 'app> {
|
|||
let pb = Arg::new("subcommand")
|
||||
.index(1)
|
||||
.setting(ArgSettings::TakesValue)
|
||||
.setting(ArgSettings::MultipleValues)
|
||||
.setting(ArgSettings::MultipleOccurrences)
|
||||
.value_name("SUBCOMMAND")
|
||||
.about("The subcommand whose help message to display");
|
||||
sc = sc.arg(pb);
|
||||
|
|
Loading…
Reference in a new issue