sade
sade copied to clipboard
[feature request] Alias for parent command should apply to subcommands
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