-
Notifications
You must be signed in to change notification settings - Fork 30
/
help.ts
23 lines (18 loc) · 633 Bytes
/
help.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Command, {flags} from '@oclif/command'
import {getHelpClass} from '@oclif/help'
export default class HelpCommand extends Command {
static description = 'display help for <%= config.bin %>'
static flags: flags.Input<any> = {
all: flags.boolean({description: 'see all commands in CLI'}),
}
static args = [
{name: 'command', required: false, description: 'command to show help for'},
]
static strict = false
async run() {
const {flags, argv} = this.parse(HelpCommand)
const Help = getHelpClass(this.config)
const help = new Help(this.config, {all: flags.all})
help.showHelp(argv)
}
}