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
Force parameters to follow options #2103
Comments
Currently, the Your feature request is to introduce a parser configuration that results in an error message if any positional parameters are found prior to the I don’t oppose this, but I won’t have time to work on this myself. Will you be able to provide a pull request with tests for this? |
Hope to have a PR this weekend. |
As documented in paragraph 3.7, "From picocli 2.0, positional parameters can be specified anywhere on the command line, they no longer need to follow the options." Is it possible with PicoCLI 4.x to create the original behavior or something similar?
Want this to work "command -a X -version 1.2 -- --optA --optB=4".
Want this to fail "command -a X -version 1 2 -- --optA --optB=4". (user typo'd the decimal for option "version")
The parameters are declared like
@parameters
List extraParamaters;
but this prevents the parser from catching the typo. If I want all parameters to come after options or even after --, is it possible to configure the framework to do this? If so, I would expect the parser to catch that the "2" is a mismatched parameter, right?
The text was updated successfully, but these errors were encountered: