-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subparsers of subparsers : missing parsing exception ? #261
Comments
If I understand correctly, you expect an error if Unless a missing argument (or subparser) is But you can add the same logic to the git example with if (program.is_subcommand_used(submodule_command) &&
!submodule_command.is_subcommand_used(submodule_update_command)) {
std::cout << "submodule command called without update subcommand" << std::endl;
} |
Right. Shouldn't it be considered an error during the |
I don't believe it is always an error. From a UI view, some authors may prefer that But, others may want to say |
While working with the example of subparsers in the documentation, with
git
:some_exe submodule
is considered valid by the parser, even if the subparser cannot have any other argument than the subparserupdate
.Did I miss something here ?
The text was updated successfully, but these errors were encountered: