-
Notifications
You must be signed in to change notification settings - Fork 659
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
Proposal: leveraging DocOpt subcommands #76
Comments
Totally agree. /cc @bborysenko @abrown-sg |
@retr0h Even with a way better command dispatcher to get rid of the https://github.com/rgreinho/docopt-subcommands-example#find-the-command-to-execute |
|
The challenge we're facing when trying to implement this (which may be a DocOpt bug) is that long arguments don't seem to work in both forms. For example:
The expected behavior is that both will work in DocOpt, however we've been unable to find a workaround with Remy's subcommand pattern that support this. #81 implements as much of this as possible, however, by moving commands into individual classes. This is a win regardless since it's a significant simplification over what we were using previously. It will also be easy to drop in DocOpt subcommand support once the bug is resolved. |
I filed an issue upstream: docopt/docopt#305. |
@abrown-sg There was a mistake in my tutorial (that I fixed), and now the parameters for the arguments work both with and without the equal sign. Basically there need to be an ellipsis (' If you can confirm that it works for your branch as well (I don't think you pushed it, so I could not try myself), then I'll close the issue that I filled upstream. |
I wrote a tutorial here (https://github.com/rgreinho/docopt-subcommands-example) which explains how to use DocOpt subcommands in a console application.
I think we should leverage this in order to be able to easily add options to the main command or the subcommands in the future.
link: PR #75
The text was updated successfully, but these errors were encountered: