Skip to content

Commit 071bddb

Browse files
committed
Consistent help callback
1 parent c55a5eb commit 071bddb

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/commands/action/cmd-action.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ const config: CliCommandConfig = {
2828
description: 'After marker'
2929
}
3030
},
31-
help: (parentName, { commandName, flags }) => `
31+
help: (command, config) => `
3232
Usage
33-
$ ${parentName} ${commandName} [options]
33+
$ ${command} [options]
3434
3535
Options
36-
${getFlagListOutput(flags, 6)}
36+
${getFlagListOutput(config.flags, 6)}
3737
`
3838
}
3939

src/commands/analytics/cmd-analytics.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ const config: CliCommandConfig = {
4242
description: 'Path to a local file to save the output'
4343
}
4444
},
45-
help: (parentName, { commandName, flags }) => `
45+
help: (command, config) => `
4646
Usage
47-
$ ${parentName} ${commandName} --scope=<scope> --time=<time filter>
47+
$ ${command} --scope=<scope> --time=<time filter>
4848
4949
Default parameters are set to show the organization-level analytics over the
5050
last 7 days.
5151
5252
Options
53-
${getFlagListOutput(flags, 6)}
53+
${getFlagListOutput(config.flags, 6)}
5454
5555
Examples
56-
$ ${parentName} ${commandName} --scope=org --time=7
57-
$ ${parentName} ${commandName} --scope=org --time=30
58-
$ ${parentName} ${commandName} --scope=repo --repo=test-repo --time=30
56+
$ ${command} --scope=org --time=7
57+
$ ${command} --scope=org --time=30
58+
$ ${command} --scope=repo --repo=test-repo --time=30
5959
`
6060
}
6161

src/commands/oops/cmd-oops.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const config: CliCommandConfig = {
77
description: 'Trigger an intentional error (for development)',
88
hidden: true,
99
flags: {},
10-
help: (parentName, config) => `
10+
help: (command, _config) => `
1111
Usage
12-
$ ${parentName} ${config.commandName}
12+
$ ${command}
1313
1414
Don't run me.
1515
`

0 commit comments

Comments
 (0)