forked from defunkt/toes
Promote status to the primary command over list and info
Hide `list` and `info` as aliases so existing scripts keep working while surfacing `status` as the canonical entry point in help output.
This commit is contained in:
parent
c12d60119f
commit
3328009af6
|
|
@ -53,17 +53,25 @@ program
|
|||
// Apps
|
||||
|
||||
program
|
||||
.command('list')
|
||||
.command('status')
|
||||
.helpGroup('Apps:')
|
||||
.description('List all apps')
|
||||
.description('Show status of all apps, or details for a specific app')
|
||||
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||
.option('-t, --tools', 'show only tools')
|
||||
.option('-a, --apps', 'show only apps (exclude tools)')
|
||||
.action((name?: string, options?: { apps?: boolean; tools?: boolean }) => {
|
||||
if (name) return infoApp(name)
|
||||
return listApps(options ?? {})
|
||||
})
|
||||
|
||||
program
|
||||
.command('list', { hidden: true })
|
||||
.option('-t, --tools', 'show only tools')
|
||||
.option('-a, --apps', 'show only apps (exclude tools)')
|
||||
.action(listApps)
|
||||
|
||||
program
|
||||
.command('info')
|
||||
.helpGroup('Apps:')
|
||||
.description('Show info for an app')
|
||||
.command('info', { hidden: true })
|
||||
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||
.action(infoApp)
|
||||
|
||||
|
|
@ -92,16 +100,6 @@ program
|
|||
.argument('[name]', 'app name (uses current directory if omitted)')
|
||||
.action(openApp)
|
||||
|
||||
program
|
||||
.command('status', { hidden: true })
|
||||
.argument('[name]', 'app name')
|
||||
.option('-t, --tools', 'show only tools')
|
||||
.option('-a, --apps', 'show only apps (exclude tools)')
|
||||
.action((name?: string, options?: { apps?: boolean; tools?: boolean }) => {
|
||||
if (name) return infoApp(name)
|
||||
return listApps(options ?? {})
|
||||
})
|
||||
|
||||
program
|
||||
.command('rename')
|
||||
.helpGroup('Apps:')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user