Skip to content

Commit

Permalink
Link to Help class in configure-help.js and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine authored and abetomo committed Mar 29, 2023
1 parent f4c7349 commit ee78d95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -919,7 +919,7 @@ The data properties are:
- `sortOptions`: sort the options alphabetically
- `showGlobalOptions`: show a section with the global options from the parent command(s)

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.
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.

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

Expand Down
2 changes: 2 additions & 0 deletions examples/configure-help.js
Expand Up @@ -5,6 +5,8 @@ const program = new commander.Command();

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

program.configureHelp({
sortSubcommands: true,
Expand Down

0 comments on commit ee78d95

Please sign in to comment.