From 8212647bb3daa80a40a046a17accaa2bb7b28557 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 30 Oct 2021 13:42:01 -0500 Subject: [PATCH] fix: Switch sub-commands from multi-val to multi-occur Similar to #2977, this changes positional argument `` in `help ` 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. --- src/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 310fdb04..3acb7fb4 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -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);