-
Notifications
You must be signed in to change notification settings - Fork 33
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
Mechanism which combines 'adding' and 'positionalList' behavior #10
Comments
Yeah, There is a way to do what you want using the internal I've also been considering cranking down its power a bit before making it public. Most arg parsing APIs have essentially 3 kinds of options: 0-arg, 1-arg, and 0/1-args (aka non-greedy 1-arg -- see #8 ). Right now One idea I've had for changing it to be less error-prone, while still exposing more power than is currently available, is to make the user (of In the meantime, would something like a " |
I'm thinking that I'm going to change |
Sorry I've been busy and haven't had a chance to consider either |
Version 2.0.0 (just released) makes this possible. I've even added an example in the README (it's also in the tests). Search for "putting" in the README. |
I want to parse a command which takes a series of key/value pairs. From my experiments,
adding
gives me the ability to accumulate multiple arguments andpositionalList
gives me the ability to consume the next two arguments after a flag. There doesn't appear to be a way to combine these so that I can accomplish something like the following:Which would somehow allow combining the
positionalList
andadding
behavior into aList<List<String>>
.The text was updated successfully, but these errors were encountered: