Skip to content
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 clap subcommand aliases #1213

Merged
merged 1 commit into from
Aug 12, 2017
Merged

Conversation

mgeisler
Copy link
Contributor

Clap has support for subcommand aliases: the aliased subcommand
behaves like the main subcommand in all respects and our code only
needs to dispatch on the name of the main subcommand. See:

https://docs.rs/clap/2.18.0/clap/struct.App.html#method.alias

The two two-level synonyms (install and uninstall) can not be handled
in this way since they dispatch to nested subcommands -- aliases can
only be made to subcommands on the same level in the hierarchy.

Clap has support for subcommand aliases: the aliased subcommand
behaves like the main subcommand in all respects and our code only
needs to dispatch on the name of the main subcommand. See:

  https://docs.rs/clap/2.18.0/clap/struct.App.html#method.alias

The two two-level synonyms (install and uninstall) can not be handled
in this way since they dispatch to nested subcommands -- aliases can
only be made to subcommands on the same level in the hierarchy.
@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 12, 2017

📌 Commit bacc0e1 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Aug 12, 2017

⌛ Testing commit bacc0e1 with merge 12ca813...

bors added a commit that referenced this pull request Aug 12, 2017
Use clap subcommand aliases

Clap has support for subcommand aliases: the aliased subcommand
behaves like the main subcommand in all respects and our code only
needs to dispatch on the name of the main subcommand. See:

  https://docs.rs/clap/2.18.0/clap/struct.App.html#method.alias

The two two-level synonyms (install and uninstall) can not be handled
in this way since they dispatch to nested subcommands -- aliases can
only be made to subcommands on the same level in the hierarchy.
@bors
Copy link
Contributor

bors commented Aug 12, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 12ca813 to master...

@bors bors merged commit bacc0e1 into rust-lang:master Aug 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants