citty icon indicating copy to clipboard operation
citty copied to clipboard

Create alias for subcommand

Open fu050409 opened this issue 1 year ago • 1 comments

Describe the feature

Hey! Sometimes we faced with a situation that we should create alias for subcommands. For example, pnpm i and pnpm install. The subcommand named i and subcommand named install is the same command.

The solution now is to create two subcommands with same value, like:

subCommands: { i: installCommand, install: installCommand }

But this looks not so elegant. Can we support alias parameter for defineCommand? I can work for my issue.

Additional information

  • [X] Would you be willing to help implement this feature?

fu050409 avatar Jul 05 '24 11:07 fu050409

it's a good idea, but the help output should also be considered

zuixinwang avatar Jul 15 '24 10:07 zuixinwang