diff --git a/src/command.ts b/src/command.ts index fda2823a..7addfb5f 100644 --- a/src/command.ts +++ b/src/command.ts @@ -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(' ') } diff --git a/test/command.test.ts b/test/command.test.ts index 0c4f3f7e..9ddda063 100644 --- a/test/command.test.ts +++ b/test/command.test.ts @@ -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 @@ -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 @@ -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 @@ -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)`)) @@ -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: .] diff --git a/test/commands/help.test.ts b/test/commands/help.test.ts index 299090ec..33c652b3 100644 --- a/test/commands/help.test.ts +++ b/test/commands/help.test.ts @@ -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