Skip to content

Commit dfe2fc7

Browse files
aweebitshadowspawn
andauthored
Improve docs about inherited settings
Co-authored-by: John Gee <[email protected]>
1 parent 55b9146 commit dfe2fc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Readme.md

+1-1
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)