diff options
Diffstat (limited to 'vendor/clap/examples')
-rw-r--r-- | vendor/clap/examples/tutorial_builder/03_04_subcommands.md | 3 | ||||
-rw-r--r-- | vendor/clap/examples/tutorial_derive/03_04_subcommands.md | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/vendor/clap/examples/tutorial_builder/03_04_subcommands.md b/vendor/clap/examples/tutorial_builder/03_04_subcommands.md index 7c73add71..a32b77685 100644 --- a/vendor/clap/examples/tutorial_builder/03_04_subcommands.md +++ b/vendor/clap/examples/tutorial_builder/03_04_subcommands.md @@ -47,7 +47,8 @@ Options: ``` -Because we set [`Command::propagate_version`][crate::Command::propagate_version]: +Since we specified [`Command::propagate_version`][crate::Command::propagate_version], the `--version` flag +is available in all subcommands: ```console $ 03_04_subcommands --version clap [..] diff --git a/vendor/clap/examples/tutorial_derive/03_04_subcommands.md b/vendor/clap/examples/tutorial_derive/03_04_subcommands.md index 1fbac8fa3..4d57dfeee 100644 --- a/vendor/clap/examples/tutorial_derive/03_04_subcommands.md +++ b/vendor/clap/examples/tutorial_derive/03_04_subcommands.md @@ -29,7 +29,8 @@ $ 03_04_subcommands_derive add bob ``` -Because we used `command: Commands` instead of `command: Option<Commands>`: +When specifying commands with `command: Commands`, they are required. +Alternatively, you could do `command: Option<Commands>` to make it optional. ```console $ 03_04_subcommands_derive ? failed @@ -47,7 +48,8 @@ Options: ``` -Because we added `#[command(propagate_version = true)]`: +Since we specified [`#[command(propagate_version = true)]`][crate::Command::propagate_version], +the `--version` flag is available in all subcommands: ```console $ 03_04_subcommands_derive --version clap [..] |