Skip to content

Commit d246cb9

Browse files
authored
Add -h as an additional help flag (#73)
* Explicitly added --help/-h flag to global flags. Moved global flags to a seperate help group. * Removed --help/-h flag from displayed global flag list due to redundancy.
1 parent ccd2944 commit d246cb9

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
"hello": {
7373
"description": "Say hello to the world and others"
7474
}
75-
}
75+
},
76+
"additionalHelpFlags": ["-h"]
7677
},
7778
"repository": "iTwin/itwin-cli",
7879
"scripts": {

src/extensions/base-command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default abstract class BaseCommand extends Command {
2626
json: Flags.boolean({
2727
char: 'j',
2828
description: 'Pretty format the JSON command response and suppress all logging.',
29+
helpGroup: 'GLOBAL',
2930
required: false
3031
}),
3132
silent: Flags.boolean({
@@ -37,6 +38,7 @@ export default abstract class BaseCommand extends Command {
3738
table: Flags.boolean({
3839
char: 't',
3940
description: 'Output the command response in a human-readable table format.',
41+
helpGroup: 'GLOBAL',
4042
required: false
4143
}),
4244
}

0 commit comments

Comments
 (0)