confusing documentation on parsing multiple subcommands (minor issue) #1434
Labels
A-docs
Area: documentation, including docs.rs, readme, examples, etc...
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
Milestone
I am working on a personal project for which I would like to parse a list of subcommands (together with their arguments).
So something like:
I wanted this to give me two subcommands (generatelist and storelist) with their arguments.
I thought this is possible because the [documentation] (https://docs.rs/clap/2.32.0/clap/enum.AppSettings.html#variant.ArgsNegateSubcommands) on
AppSettings::ArgsNegateSubcommands
states:As I couldn't make my program work I checked for more sources and found
W: wont do
)clap/examples/20_subcommands.rs
:Both basically state, that what I wanted to do is not possible.
So my best guess is, that the documentation on
AppSettings::ArgsNegateSubcommands
assumes<cmd3>
to be a subcommand of<cmd2>
, which should be a subcommand of<cmd>
Possible fix
The simplest solution to avoid this confusion would probably be to rename the subcommands in the documentation to
<cmd>
,<subcmd>
and<subsubcommand>
The text was updated successfully, but these errors were encountered: