summaryrefslogtreecommitdiffstats
path: root/vendor/clap/examples
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap/examples')
-rw-r--r--vendor/clap/examples/git-derive.md27
-rw-r--r--vendor/clap/examples/git-derive.rs1
-rw-r--r--vendor/clap/examples/git.md27
-rw-r--r--vendor/clap/examples/git.rs1
4 files changed, 42 insertions, 14 deletions
diff --git a/vendor/clap/examples/git-derive.md b/vendor/clap/examples/git-derive.md
index 57edb612e..119a19782 100644
--- a/vendor/clap/examples/git-derive.md
+++ b/vendor/clap/examples/git-derive.md
@@ -73,18 +73,31 @@ Default subcommand:
```console
$ git-derive stash -h
Usage: git-derive[EXE] stash [OPTIONS]
- git-derive[EXE] stash <COMMAND>
-
-Commands:
- push
- pop
- apply
- help Print this message or the help of the given subcommand(s)
+ git-derive[EXE] stash push [OPTIONS]
+ git-derive[EXE] stash pop [STASH]
+ git-derive[EXE] stash apply [STASH]
+ git-derive[EXE] stash help [COMMAND]...
Options:
-m, --message <MESSAGE>
-h, --help Print help
+git-derive[EXE] stash push:
+ -m, --message <MESSAGE>
+ -h, --help Print help
+
+git-derive[EXE] stash pop:
+ -h, --help Print help
+ [STASH]
+
+git-derive[EXE] stash apply:
+ -h, --help Print help
+ [STASH]
+
+git-derive[EXE] stash help:
+Print this message or the help of the given subcommand(s)
+ [COMMAND]... Print help for the subcommand(s)
+
$ git-derive stash push -h
Usage: git-derive[EXE] stash push [OPTIONS]
diff --git a/vendor/clap/examples/git-derive.rs b/vendor/clap/examples/git-derive.rs
index ad82e0cea..9d171373d 100644
--- a/vendor/clap/examples/git-derive.rs
+++ b/vendor/clap/examples/git-derive.rs
@@ -76,6 +76,7 @@ impl std::fmt::Display for ColorWhen {
#[derive(Debug, Args)]
#[command(args_conflicts_with_subcommands = true)]
+#[command(flatten_help = true)]
struct StashArgs {
#[command(subcommand)]
command: Option<StashCommands>,
diff --git a/vendor/clap/examples/git.md b/vendor/clap/examples/git.md
index d90b2e8e0..61a9403f7 100644
--- a/vendor/clap/examples/git.md
+++ b/vendor/clap/examples/git.md
@@ -71,18 +71,31 @@ Default subcommand:
```console
$ git stash -h
Usage: git[EXE] stash [OPTIONS]
- git[EXE] stash <COMMAND>
-
-Commands:
- push
- pop
- apply
- help Print this message or the help of the given subcommand(s)
+ git[EXE] stash push [OPTIONS]
+ git[EXE] stash pop [STASH]
+ git[EXE] stash apply [STASH]
+ git[EXE] stash help [COMMAND]...
Options:
-m, --message <MESSAGE>
-h, --help Print help
+git[EXE] stash push:
+ -m, --message <MESSAGE>
+ -h, --help Print help
+
+git[EXE] stash pop:
+ -h, --help Print help
+ [STASH]
+
+git[EXE] stash apply:
+ -h, --help Print help
+ [STASH]
+
+git[EXE] stash help:
+Print this message or the help of the given subcommand(s)
+ [COMMAND]... Print help for the subcommand(s)
+
$ git stash push -h
Usage: git[EXE] stash push [OPTIONS]
diff --git a/vendor/clap/examples/git.rs b/vendor/clap/examples/git.rs
index 02173675f..fc8fd01f7 100644
--- a/vendor/clap/examples/git.rs
+++ b/vendor/clap/examples/git.rs
@@ -45,6 +45,7 @@ fn cli() -> Command {
.subcommand(
Command::new("stash")
.args_conflicts_with_subcommands(true)
+ .flatten_help(true)
.args(push_args())
.subcommand(Command::new("push").args(push_args()))
.subcommand(Command::new("pop").arg(arg!([STASH])))