Skip to content

Consider Inferred Subcommands #980

@kbknapp

Description

@kbknapp

As of clap v2.21 there is a new setting that allows subcommands to be inferred so long as they're not ambiguous. Since rustup makes heavy use of long strings of subcommands this could greatly increase ergonomics.

For instance the following are equivilant:

$ rustup toolchain update stable
$ rustup to up stable

This also completely sidesteps the, "was it toolchain or toolchains?"

The only change that would be needed in the code is adding a line right after this one with the following:

.global_setting(AppSettings::InferSubcommands)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions