Skip to content
Myr

Improve docs about inherited settings

Before adoption: this commit came in with the history the project adopted, so no landing records it.

(cherry picked from commit dfe2fc74a53db43153f4305ec5f9f1cc6a13c64f)

authored by aweebit · committed by Abe Tomoaki · parent 2e2f139 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: John Gee <john@ruru.gen.nz>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:Readme.md+1 added-1 removed
544 unmodified lines
545subcommand is specified ([example](./examples/defaultCommand.js)).546547You can add alternative names for a command with `.alias()`. ([example](./examples/alias.js))548549Commands 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.550551For 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.552553### Command-arguments
595 unmodified lines