-
Notifications
You must be signed in to change notification settings - Fork 422
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
Abort parsing when encountering help option (was: MissingParameterException thrown when subcommand has required options and help option is defined) #1183
Comments
Hi @drkilikil Are you trying to get help for the ( The To get help for the
To get help for the subcommand, users would run:
The last example should not throw a MissingParameterException and should not require the user to specify the |
Display help for the top-level or sub commands is clear and not problematic.
The last two commands should show the help message for the top-level command. |
You make a good point. Thank you for the clarification. To rephrase your point: shouldn't the picocli parser abort parsing further command line arguments as soon as it encounters the I agree that this does seem to be the intuitive thing to do. |
This is exactly what I mean. And thanks for this great tool. A really good job! |
Glad to hear you like picocli! 😊 |
I finally got a chance to look at this. |
… subcommand has required options and help option is specified on parent command Closes remkop#1183
Hi,
If I run the sample below with the command line:
-h subcmd
Picocli throws the MissingParameterException exception.The required option must be provided to print help of the main command.
-h subcmd -o foo
prints help in the same way as-h subcmd
when the option is not required.Is it possible to not check subcommands when a "help" option is specifed on the command line?
Cheers.
The text was updated successfully, but these errors were encountered: