From 36b06c1d32309d781a0258c80c6548b36ab4f001 Mon Sep 17 00:00:00 2001 From: aweebit <36817090+aweebit@users.noreply.github.com> Date: Sat, 29 Jul 2023 11:51:54 +0300 Subject: [PATCH] Improve docs about inherited settings (cherry picked from commit dfe2fc74a53db43153f4305ec5f9f1cc6a13c64f) Co-authored-by: John Gee --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 611998cbe..f92667d7a 100644 --- a/Readme.md +++ b/Readme.md @@ -546,7 +546,7 @@ 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. +`.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. 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.