You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When InferSubcommands is enabled, subcommand inference only works for the top level of subcommands- to call nested subcommands the entire command must be written out.
use structopt::{StructOpt, clap::AppSettings};#[derive(StructOpt)]#[structopt(setting = AppSettings::InferSubcommands)]enumArgs{SomeCommand(SubSubCommand),AnotherCommand,}#[derive(StructOpt)]#[structopt(setting = AppSettings::InferSubcommands)]enumSubSubCommand{TestCommand,}fnmain(){let args = Args::from_args();}
cargo run some-command test-commandworks
cargo run some test-commandworks
cargo run some-command testdoesn't work
cargo run some testdoesn't work
i've tried both the above syntax, and explicitly marking with the #[structopt(subcommand] tag.
The text was updated successfully, but these errors were encountered:
When
InferSubcommands
is enabled, subcommand inference only works for the top level of subcommands- to call nested subcommands the entire command must be written out.cargo run some-command test-command
workscargo run some test-command
workscargo run some-command test
doesn't workcargo run some test
doesn't worki've tried both the above syntax, and explicitly marking with the
#[structopt(subcommand]
tag.The text was updated successfully, but these errors were encountered: