* Add prepared custom help command. * * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()` * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only * @return {Command}
(helpCommand, deprecatedDescription)
| 442 | * @return {Command} `this` command for chaining |
| 443 | */ |
| 444 | addHelpCommand(helpCommand, deprecatedDescription) { |
| 445 | // If not passed an object, call through to helpCommand for backwards compatibility, |
| 446 | // as addHelpCommand was originally used like helpCommand is now. |
| 447 | if (typeof helpCommand !== 'object') { |
| 448 | this.helpCommand(helpCommand, deprecatedDescription); |
| 449 | return this; |
| 450 | } |
| 451 | |
| 452 | this._addImplicitHelpCommand = true; |
| 453 | this._helpCommand = helpCommand; |
| 454 | this._initCommandGroup(helpCommand); |
| 455 | return this; |
| 456 | } |
| 457 | |
| 458 | /** |
| 459 | * Lazy create help command. |
no test coverage detected