File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,13 @@ const addCommandThis: commander.Command = program.addCommand(new commander.Comma
55
55
// arguments
56
56
const argumentsThis : commander . Command = program . arguments ( '<cmd> [env]' ) ;
57
57
58
+ // addHelpCommand
59
+ const addHelpCommandThis1 : commander . Command = program . addHelpCommand ( ) ;
60
+ const addHelpCommandThis3 : commander . Command = program . addHelpCommand ( false ) ;
61
+ const addHelpCommandThis2 : commander . Command = program . addHelpCommand ( true ) ;
62
+ const addHelpCommandThis4 : commander . Command = program . addHelpCommand ( 'compress <file>' ) ;
63
+ const addHelpCommandThis5 : commander . Command = program . addHelpCommand ( 'compress <file>' , 'compress target file' ) ;
64
+
58
65
// exitOverride
59
66
const exitThis1 : commander . Command = program . exitOverride ( ) ;
60
67
const exitThis2 : commander . Command = program . exitOverride ( ( err ) : never => {
Original file line number Diff line number Diff line change @@ -109,6 +109,17 @@ declare namespace commander {
109
109
*/
110
110
arguments ( desc : string ) : this;
111
111
112
+ /**
113
+ * Override default decision whether to add implicit help command.
114
+ *
115
+ * addHelpCommand() // force on
116
+ * addHelpCommand(false); // force off
117
+ * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details
118
+ *
119
+ * @returns `this` command for chaining
120
+ */
121
+ addHelpCommand ( enableOrNameAndArgs ?: string | boolean , description ?: string ) : this;
122
+
112
123
/**
113
124
* Register callback to use as replacement for calling process.exit.
114
125
*/
You can’t perform that action at this time.
0 commit comments