Skip to content

Commit

Permalink
Add note on inherited settings to docs
Browse files Browse the repository at this point in the history
(cherry picked from commit ac955dc)
  • Loading branch information
aweebit committed Aug 1, 2023
1 parent d038570 commit 9518afa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ subcommand is specified ([example](./examples/defaultCommand.js)).

You can add alternative names for a command with `.alias()`. ([example](./examples/alias.js))

Commands added with `.command()` automatically inherit settings for which inheritance is meaningful from the parent command, but only upon the subcommand creation. The setting changes made after calling `.command()` are not inherited.

For safety, `.addCommand()` does not automatically copy the inherited settings from the parent command. There is a helper routine `.copyInheritedSettings()` for copying the settings when they are wanted.

### Command-arguments
Expand Down

0 comments on commit 9518afa

Please sign in to comment.