Skip to content

Commit ee78d95

Browse files
raineorshineabetomo
authored andcommitted
Link to Help class in configure-help.js and README.
1 parent f4c7349 commit ee78d95

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ The data properties are:
919919
- `sortOptions`: sort the options alphabetically
920920
- `showGlobalOptions`: show a section with the global options from the parent command(s)
921921

922-
There are methods getting the visible lists of arguments, options, and subcommands. There are methods for formatting the items in the lists, with each item having a _term_ and _description_. Take a look at `.formatHelp()` to see how they are used.
922+
You can override any method on the [Help](./lib/help.js) class. There are methods getting the visible lists of arguments, options, and subcommands. There are methods for formatting the items in the lists, with each item having a _term_ and _description_. Take a look at `.formatHelp()` to see how they are used.
923923

924924
Example file: [configure-help.js](./examples/configure-help.js)
925925

examples/configure-help.js

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const program = new commander.Command();
55

66
// This example shows a simple use of configureHelp.
77
// This is used as an example in the README.
8+
// Any method on the Help class can be overridden
9+
// See: https://github.com/tj/commander.js/blob/master/lib/help.js
810

911
program.configureHelp({
1012
sortSubcommands: true,

0 commit comments

Comments
 (0)