-
Notifications
You must be signed in to change notification settings - Fork 564
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
Group options #294
Comments
I made a PR that enables just that: #313 This example would be:
Feedback is very welcome. |
Awesome work! |
Thanks for your taking your time. Docopt syntax is based on POSIX, and we allow extensions only if their syntax is widely used. Do you have any alternatives to |
That's the best syntax I could come up with. Suggestions are welcome. Another idea was to just use I wasn't able to find any mentions of similar problems nor their solutions by other parsers. Perhaps I'm bad at searching but I did try... From what I have encountered in the wild, subcommands would be the way to go, git-style. Naval Fate implemented with subcommands would, IMO, be as serious overkill. |
I have made a fork for my own use. I tried to make the authorship and copyright info plain. I hope you are ok with this, @keleshev. Let me know if not. https://github.com/frnhr/docopt_plus I will try to implement some additional features there. Some of which might be acceptable for merge with Docopt in the future. |
I don't understand why we need an additional syntax for it. It works for
Just let it work for
? |
Well, we don't need a new syntax, that's true. And probably more POSIX-y as well. But when I see usage pattern like this:
I have no way of knowing whether Additionally, it might be interesting to have non-optional groups of options, for example:
These are obviously contrived examples, perhaps there are better examples in the wild... But yeah, it's not in any standard... |
Oh, this issue is five years old. And I don't use |
@conqp probably quicker if you close it yourself... |
Is it possible to add a feature for dynamically grouping options, like:
The text was updated successfully, but these errors were encountered: