Skip to content

Commit 88d4d94

Browse files
committed
Auto merge of #12570 - dtolnay-contrib:subcommandtemplate, r=weihanglo
Define {{command}} for use in src/doc/man/includes I am interested in using this in #12568. ```diff {{#option "`--keep-going`"}} Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. For example if the current package depends on dependencies `fails` and `works`, - one of which fails to build, `cargo check -j1` may or may not build the one that + one of which fails to build, `cargo {{command}} -j1` may or may not build the one that succeeds (depending on which one of the two builds Cargo picked to run first), - whereas `cargo check -j1 --keep-going` would definitely run both builds, even if + whereas `cargo {{command}} -j1 --keep-going` would definitely run both builds, even if the one run first fails. {{/option}} ```
2 parents 8d73765 + 134a00c commit 88d4d94

34 files changed

+54
-76
lines changed

src/doc/man/cargo-add.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cargo-add(1)
2-
3-
{{*set actionverb="Add"}}
4-
{{*set nouns="adds"}}
2+
{{~*set command="add"}}
3+
{{~*set actionverb="Add"}}
4+
{{~*set nouns="adds"}}
55

66
## NAME
77

src/doc/man/cargo-bench.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# cargo-bench(1)
2-
{{*set actionverb="Benchmark"}}
3-
{{*set nouns="benchmarks"}}
4-
{{*set multitarget=true}}
2+
{{~*set command="bench"}}
3+
{{~*set actionverb="Benchmark"}}
4+
{{~*set nouns="benchmarks"}}
5+
{{~*set multitarget=true}}
56

67
## NAME
78

src/doc/man/cargo-build.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-build(1)
2-
{{*set actionverb="Build"}}
3-
{{*set multitarget=true}}
2+
{{~*set command="build"}}
3+
{{~*set actionverb="Build"}}
4+
{{~*set multitarget=true}}
45

56
## NAME
67

src/doc/man/cargo-check.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-check(1)
2-
{{*set actionverb="Check"}}
3-
{{*set multitarget=true}}
2+
{{~*set command="check"}}
3+
{{~*set actionverb="Check"}}
4+
{{~*set multitarget=true}}
45

56
## NAME
67

src/doc/man/cargo-clean.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-clean(1)
2-
{{*set actionverb="Clean"}}
3-
{{*set multitarget=true}}
2+
{{~*set command="clean"}}
3+
{{~*set actionverb="Clean"}}
4+
{{~*set multitarget=true}}
45

56
## NAME
67

src/doc/man/cargo-doc.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-doc(1)
2-
{{*set actionverb="Document"}}
3-
{{*set multitarget=true}}
2+
{{~*set command="doc"}}
3+
{{~*set actionverb="Document"}}
4+
{{~*set multitarget=true}}
45

56
## NAME
67

src/doc/man/cargo-fetch.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# cargo-fetch(1)
2-
{{*set actionverb="Fetch"}}
3-
{{*set target-default-to-all-arch=true}}
4-
{{*set multitarget=true}}
2+
{{~*set command="fetch"}}
3+
{{~*set actionverb="Fetch"}}
4+
{{~*set target-default-to-all-arch=true}}
5+
{{~*set multitarget=true}}
56

67
## NAME
78

src/doc/man/cargo-fix.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-fix(1)
2-
{{*set actionverb="Fix"}}
3-
{{*set multitarget=true}}
2+
{{~*set command="fix"}}
3+
{{~*set actionverb="Fix"}}
4+
{{~*set multitarget=true}}
45

56
## NAME
67

src/doc/man/cargo-install.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cargo-install(1)
2-
{{*set actionverb="Install"}}
3-
{{*set temp-target-dir=true}}
2+
{{~*set command="install"}}
3+
{{~*set actionverb="Install"}}
4+
{{~*set temp-target-dir=true}}
45

56
## NAME
67

src/doc/man/cargo-package.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# cargo-package(1)
2-
{{*set actionverb="Package"}}
3-
{{*set noall=true}}
4-
{{*set multitarget=true}}
2+
{{~*set command="package"}}
3+
{{~*set actionverb="Package"}}
4+
{{~*set noall=true}}
5+
{{~*set multitarget=true}}
56

67
## NAME
78

0 commit comments

Comments
 (0)