Skip to content

Commit ac955dc

Browse files
authored
Add note on inherited settings to docs
1 parent 97fda7c commit ac955dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ subcommand is specified ([example](./examples/defaultCommand.js)).
546546

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

549+
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.
550+
549551
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.
550552

551553
### Command-arguments

0 commit comments

Comments
 (0)