Skip to content

Subcommand with multiple "names" #91

Description

@peperunas

Hello!

I would like to know if it is possible to add alternatives to invoke the same Subcommand.

Take this for example:

#[derive(StructOpt, Debug)]
pub enum Subcommand {
    #[structopt(name = "action")]
    Action {
        #[structopt(name = "something")]
        something: String,
    }
}

In order to use the subcommand, the user should type ./myapp action. I would like to "shorten" it to ./myapp a or even ./myapp act.

Is it possible to achieve something like this?

Thanks and keep up the awesome work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions