sade icon indicating copy to clipboard operation
sade copied to clipboard

[feature request] Alias for parent command should apply to subcommands

Open jsumners opened this issue 4 years ago • 0 comments

prog
  .command('foo')
  .describe('Top level command')
  .alias('f')
  .action(() => console.log('see `app foo --help`'))

prog
  .command('foo bar')
  .describe('A subcommand')
  .action(() => console.log('did a thing'))

prog
  .command('foo baz <a>')
  .describe('Another subcommand')
  .action((a) => console.log('did another thing', a))

Given the above, each of the following should work:

  • prog foo
  • prog foo bar
  • prog foo baz 1
  • prog f
  • prog f bar
  • prog f baz 1

jsumners avatar Mar 04 '20 17:03 jsumners