summaryrefslogtreecommitdiffstats
path: root/vendor/clap/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/clap/examples
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/clap/examples')
-rw-r--r--vendor/clap/examples/tutorial_builder/03_04_subcommands.md3
-rw-r--r--vendor/clap/examples/tutorial_derive/03_04_subcommands.md6
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 [..]