Skip to content

Commit 880b028

Browse files
aweebitshadowspawn
authored andcommitted
Improve docs about inherited settings
(cherry picked from commit dfe2fc7) Co-authored-by: John Gee <john@ruru.gen.nz>
1 parent 2e2f139 commit 880b028

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ 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.
549+
`.command()` automatically copies the inherited settings from the parent command to the newly created subcommand. This is only done during creation, any later setting changes to the parent are not inherited.
550550

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

0 commit comments

Comments
 (0)