Skip to content

Commit

Permalink
fix: hide OPTIONS for now
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 15, 2018
1 parent ef160bb commit 7e70920
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export default class CommandHelp {
].join('\n')
}

protected defaultUsage(command: Config.Command, flags: Config.Command.Flag[]): string {
protected defaultUsage(command: Config.Command, _: Config.Command.Flag[]): string {
return compact([
command.id,
command.args.filter(a => !a.hidden).map(a => this.arg(a)).join(' '),
flags.length && '[OPTIONS]',
// flags.length && '[OPTIONS]',
]).join(' ')
}

Expand Down
10 changes: 5 additions & 5 deletions test/command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ multiline help`
remote: flags.string({char: 'r'}),
}})
.it('shows lots of output', ctx => expect(ctx.commandHelp).to.equal(`USAGE
$ oclif apps:create [APP_NAME] [OPTIONS]
$ oclif apps:create [APP_NAME]
ARGUMENTS
APP_NAME app to use
Expand Down Expand Up @@ -83,7 +83,7 @@ ALIASES
remote: flags.string({char: 'r'}),
}})
.it('shows alternate output when many lines', ctx => expect(ctx.commandHelp).to.equal(`USAGE
$ oclif apps:create [APP_NAME] [OPTIONS]
$ oclif apps:create [APP_NAME]
ARGUMENTS
APP_NAME app to use
Expand Down Expand Up @@ -122,7 +122,7 @@ ALIASES
force: flags.boolean({description: 'forces'}),
}})
.it('outputs with description', ctx => expect(ctx.commandHelp).to.equal(`USAGE
$ oclif apps:create [APP_NAME] [OPTIONS]
$ oclif apps:create [APP_NAME]
ARGUMENTS
APP_NAME app to use
Expand All @@ -141,7 +141,7 @@ ALIASES
myenum: flags.enum({options: ['a', 'b', 'c']}),
}})
.it('outputs with description', ctx => expect(ctx.commandHelp).to.equal(`USAGE
$ oclif apps:create [OPTIONS]
$ oclif apps:create
OPTIONS
--myenum=(a|b|c)`))
Expand All @@ -161,7 +161,7 @@ OPTIONS
}
})
.it('outputs with default options', ctx => expect(ctx.commandHelp).to.equal(`USAGE
$ oclif apps:create [ARG1] [ARG2] [ARG3] [OPTIONS]
$ oclif apps:create [ARG1] [ARG2] [ARG3]
ARGUMENTS
ARG1 [default: .]
Expand Down
2 changes: 1 addition & 1 deletion test/commands/help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('help command', () => {
expect(ctx.stdout).to.equal(`display help for oclif
USAGE
$ oclif help [COMMAND] [OPTIONS]
$ oclif help [COMMAND]
ARGUMENTS
COMMAND command to show help for
Expand Down

0 comments on commit 7e70920

Please sign in to comment.