-
Notifications
You must be signed in to change notification settings - Fork 418
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
Unexpected match in @ArgGroup multiplicity="1" with multiple values @Option #815
Comments
Currently the parser does not greedily continue to add values to the multi-value I need to look at this in more detail. |
As a workaround, you can define the @Option(names = {"--id"}, split = ",")
List<String> id; That way, users can specify |
One idea is to introduce a parser configuration option Test:
Then, the following change would make the test pass:
Perhaps a better solution would be to introduce Introducing A new GroupMatch would then be created if the max multiplicity of a multi-value option was reached. There would be no need for a parser configuration option Perhaps |
Fixed in master. I decided to keep it simple. The fix should work for your use case. |
That's great! We could get expected result with current HEAD. |
Glad to hear that! I will try to do a release for this in a week or so. |
Java=11, picocli=4.0.4
I need ArgGroup at least one option required command.
But ArgGroup contains multiple values option (without
arity="1..*"
),parser looks like cannot match force by
multiplicity
.I think, input command argument looks satisfy printed usage condition.
Is this a bug?
The text was updated successfully, but these errors were encountered: