-
Notifications
You must be signed in to change notification settings - Fork 893
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
Multiple CLI cleanups #419
Conversation
I didn't make it clear but the hidden synonyms aren't just compromise, but some are needed because I changed some of the 'preferred' verbs. |
I wonder if it'd be worth to also have a dedicated |
clap-rs/clap#469 may be applicable too. It's something I hadn't prioritized, but would be a very quick addition. |
☔ The latest upstream changes (presumably #425) made this pull request unmergeable. Please resolve the merge conflicts. |
These are just the fully names of the `rustup install` and `rustup update` commands.
This emphasizes `rustup toolchain install` for installing toolchains, reinforcing the 'toolchain' nomenclature; leaving `rustup update` for updating everything.
'show', 'update', 'default', 'toolchain', 'target', etc.
This reorganizes the verbs used in rustup commands. The concept here is that every subcommand uses the most appropriate 'add/remove' verb pair for itself, but implements hidden alternate commands using the obvious other verbs. So now the problematic verbs are: * `toolchain install` / `toolchain uninstall` * `target add` / `target remove` * `override set` / `override unset` Additional (hidden) synonyms are: * `toolchain update` * `toolchain add` / `toolchain remove` * `target add` / `target remove` This leaves the top level `rustup update` as the only non-hidden 'update' command, which has the unique focus of updating everything.
@alexcrichton I added |
Sounds good to me! Maybe some of the README could be updated as well? Other than r=me though, this all sounds good to me |
Well I made |
Ah ok, either way sounds good to me |
I went ahead and put the sweet commands in the README (but still not in |
This adds help text for most subcommands and cleans them up in various ways.
The most important thing this does is try to resolve the bikesheddy problem of command synonyms that has been bugging me. That is, should the command be 'install' or 'update'? Should all install-like commands be the same verb or not?
From the commit, this is what I'm going for:
This reorganizes the verbs used in rustup commands. The concept here
is that every subcommand uses the most appropriate 'add/remove' verb
pair for itself, but implements hidden alternate commands using
the obvious other verbs.
So now the problematic verbs are:
toolchain install
/toolchain uninstall
target add
/target remove
override set
/override unset
Additional (hidden) synonyms are:
toolchain update
toolchain add
/toolchain remove
target add
/target remove
This leaves the top level
rustup update
as the only non-hidden'update' command, which has the unique focus of updating everything.
@aturon Importantly, this means that in the README I'm showing
rustup toolchain install $toolchain
for the installation command, andrustup update
for doing updates. I like emphasizing the 'toolchain' in early examples of install command because it's an important concept. This is slightly different than the blog post you have in your hands where I'm demonstrating the (shorter but non-existant)rustup install
command, which I have not implemented here.