-
Notifications
You must be signed in to change notification settings - Fork 888
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
Use docopt for multirust binary #38
Comments
Hi @jwilm, I'm a little skeptical of tools which generate the CLI from the usage text, as I usually find it too restrictive. I'm not prepared to switch to docopt purely on the basis of neatness/maintenance, as I personally find cli.rs to be quite structured and easy to modify. It is long, but that's mainly due to the amount of descriptive text about each command. However, I may be open to switching if the alternative provides other tangible benefits (such as being able to handle OsStrings correctly) without having signficant drawbacks. |
Clap-rs is another contender that is worth looking into. |
@azerupi clap-rs is what multirust currently uses. |
Ah sorry, my mistake. I should have looked before saying anything. After taking a look at |
Thanks for the discussion about this. You're right that docopt would be too restrictive for multirust-rs; it doesn't appear to support extended help for subcommands. I'm on a bit of a docopt kick lately since it has made my CLI source files stupid simple. I should have looked more closely at what the multirust-rs cli.rs was actually doing first. Sorry about that! At least there's an issue in the history now for the next person who might be curious about cli.rs/docopt 😄. @azerupi you're totally right that the clap-rs API is straight-forward. I would argue that having no API is simpler, though. It will definitely be my go-to arg parser if/when I run into the limits of docopt. clap-rs seems to be a good choice here; closing. |
# This is the 1st commit message: Port cli_inst_interactive to CliTestContext # The commit message #2 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #3 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #4 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #5 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #6 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #7 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #8 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #9 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #10 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #11 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #12 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #13 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #14 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #15 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #16 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #17 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #18 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #19 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #20 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #21 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #22 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #23 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #24 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #25 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #26 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #27 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #28 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #29 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #30 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #31 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #32 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #33 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #34 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #35 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #36 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #37 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #38 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #39 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext # The commit message #40 will be skipped: # fixup! Port cli_inst_interactive to CliTestContext
Hey @Diggsey,
I've been poking around this project a bit to figure out the library API, and I had a look at the cli file. It's sort of..... unapproachable 😁. The API multirust exposes could easily be written using docopt, and it would make maintenance a lot easier.
Are you open to a PR for this if it showed up?
The text was updated successfully, but these errors were encountered: