Closed babysnakes closed 2 years ago
This is because structopt (and clap_derive which is a fork of structopt) use SubcommandRequiredElseHelp. This makes it so its both an error and a shortcut to show help.
btw in case you didn't know, clap 3 is out which integrates structopt directly into clap. structopt is now in maintenance mode (see https://github.com/TeXitoi/structopt/issues/516).
btw in case you didn't know, clap 3 is out which integrates structopt directly into clap. structopt is now in maintenance mode (see #516).
Oh cool, I didn't know it. I'll check it out. (also thanks for the explenation 🙂).
First, just let me thank you for this amazing library 😄. It really is amazing.
I'm not sure whether this is caused by structopt or by clap, but I'm posting it here since this is what I use.
I created
main.rs
based on one of the examples in the docs:Running this example without providing subcommand does result in an error but does not print any error:
If I'm missing a regular positional argument it does prints the error:
Is this a normal behavior?
Versions: rustc 1.56.1 (59eed8a2a 2021-11-01) structopt v0.3.25
Thanks
Haim