diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 3347d8c9d41..325e765f29c 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -132,11 +132,14 @@ pub trait AppExt: Sized { } fn arg_features(self) -> Self { - self._arg(multi_opt( - "features", - "FEATURES", - "Space or comma separated list of features to activate", - )) + self._arg( + multi_opt( + "features", + "FEATURES", + "Space or comma separated list of features to activate", + ) + .short('F'), + ) ._arg(opt("all-features", "Activate all available features")) ._arg(opt( "no-default-features", diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index c195e2b90b9..f3b46f6981c 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -181,7 +181,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index bc00a407638..db0497dd8e2 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -114,7 +114,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index 604a0a8ffb1..326c6588d8b 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -120,7 +120,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt index a588dc0a956..f5457629cf6 100644 --- a/src/doc/man/generated_txt/cargo-doc.txt +++ b/src/doc/man/generated_txt/cargo-doc.txt @@ -98,7 +98,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt index a584173e7f0..0b5ada717b5 100644 --- a/src/doc/man/generated_txt/cargo-fix.txt +++ b/src/doc/man/generated_txt/cargo-fix.txt @@ -193,7 +193,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt index 473e9b117e5..4bcd7d9c40e 100644 --- a/src/doc/man/generated_txt/cargo-install.txt +++ b/src/doc/man/generated_txt/cargo-install.txt @@ -157,7 +157,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-metadata.txt b/src/doc/man/generated_txt/cargo-metadata.txt index ddb0ee3ca41..3fdff6d36fd 100644 --- a/src/doc/man/generated_txt/cargo-metadata.txt +++ b/src/doc/man/generated_txt/cargo-metadata.txt @@ -315,7 +315,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt index de96c2874f0..a0a3fc64ec4 100644 --- a/src/doc/man/generated_txt/cargo-package.txt +++ b/src/doc/man/generated_txt/cargo-package.txt @@ -139,7 +139,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt index 4c40a5f7448..1328ab7ec0b 100644 --- a/src/doc/man/generated_txt/cargo-publish.txt +++ b/src/doc/man/generated_txt/cargo-publish.txt @@ -106,7 +106,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt index 753fe34fccb..96c3feece6f 100644 --- a/src/doc/man/generated_txt/cargo-run.txt +++ b/src/doc/man/generated_txt/cargo-run.txt @@ -43,7 +43,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index ab8f8106385..2ab3f93faf4 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -105,7 +105,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt index e5238588d79..66f16c13ace 100644 --- a/src/doc/man/generated_txt/cargo-rustdoc.txt +++ b/src/doc/man/generated_txt/cargo-rustdoc.txt @@ -114,7 +114,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index f6668543267..56e3641b1d6 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -191,7 +191,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/generated_txt/cargo-tree.txt b/src/doc/man/generated_txt/cargo-tree.txt index c8d4c6b5e5d..d6f6c39ec66 100644 --- a/src/doc/man/generated_txt/cargo-tree.txt +++ b/src/doc/man/generated_txt/cargo-tree.txt @@ -224,7 +224,7 @@ OPTIONS for more details. - --features features + -F features, --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all diff --git a/src/doc/man/includes/section-features.md b/src/doc/man/includes/section-features.md index f4947f7f582..99c13fe1bbe 100644 --- a/src/doc/man/includes/section-features.md +++ b/src/doc/man/includes/section-features.md @@ -9,7 +9,7 @@ for more details. {{#options}} -{{#option "`--features` _features_" }} +{{#option "`-F` _features_" "`--features` _features_" }} Space or comma separated list of features to activate. Features of workspace members may be enabled with `package-name/feature-name` syntax. This flag may be specified multiple times, which enables all specified features. diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index 67d2a4ee580..a7fdebc5e42 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -219,6 +219,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md index 1822e4e9ca7..7ba043b1a07 100644 --- a/src/doc/src/commands/cargo-build.md +++ b/src/doc/src/commands/cargo-build.md @@ -147,6 +147,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md index dd845e13958..967b4cb3adb 100644 --- a/src/doc/src/commands/cargo-check.md +++ b/src/doc/src/commands/cargo-check.md @@ -152,6 +152,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md index d8380cb912b..f0927484d65 100644 --- a/src/doc/src/commands/cargo-doc.md +++ b/src/doc/src/commands/cargo-doc.md @@ -130,6 +130,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md index 04b4a54642e..d871cb10997 100644 --- a/src/doc/src/commands/cargo-fix.md +++ b/src/doc/src/commands/cargo-fix.md @@ -232,6 +232,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md index ab363420923..f4c2c6af0d4 100644 --- a/src/doc/src/commands/cargo-install.md +++ b/src/doc/src/commands/cargo-install.md @@ -179,6 +179,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-metadata.md b/src/doc/src/commands/cargo-metadata.md index 870b6ef35c9..8b5f5b2123e 100644 --- a/src/doc/src/commands/cargo-metadata.md +++ b/src/doc/src/commands/cargo-metadata.md @@ -330,6 +330,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md index 0c592d25be8..5e9e686baa7 100644 --- a/src/doc/src/commands/cargo-package.md +++ b/src/doc/src/commands/cargo-package.md @@ -163,6 +163,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md index 955d062be18..c494bde3d5d 100644 --- a/src/doc/src/commands/cargo-publish.md +++ b/src/doc/src/commands/cargo-publish.md @@ -129,6 +129,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md index 100dedc3c0a..f71a769d497 100644 --- a/src/doc/src/commands/cargo-run.md +++ b/src/doc/src/commands/cargo-run.md @@ -65,6 +65,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md index 28a6a8e9b4e..6101bf343a6 100644 --- a/src/doc/src/commands/cargo-rustc.md +++ b/src/doc/src/commands/cargo-rustc.md @@ -134,6 +134,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md index af2b05f5f98..76e45bb52f3 100644 --- a/src/doc/src/commands/cargo-rustdoc.md +++ b/src/doc/src/commands/cargo-rustdoc.md @@ -149,6 +149,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index 34d29ffbec5..203fee22979 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -228,6 +228,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/doc/src/commands/cargo-tree.md b/src/doc/src/commands/cargo-tree.md index b1880b4569e..6a9a73d0290 100644 --- a/src/doc/src/commands/cargo-tree.md +++ b/src/doc/src/commands/cargo-tree.md @@ -249,6 +249,7 @@ for more details.
+
-F features
--features features
Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may diff --git a/src/etc/_cargo b/src/etc/_cargo index 519ae45de15..3b07b25db6d 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -51,8 +51,8 @@ _cargo() { ) features=( - '(--all-features)--features=[specify features to activate]:feature' - '(--features)--all-features[activate all available features]' + '(--all-features)'{-F+,--features=}'[specify features to activate]:feature' + '(--features -F)--all-features[activate all available features]' "--no-default-features[don't build the default features]" ) diff --git a/src/etc/cargo.bashcomp.sh b/src/etc/cargo.bashcomp.sh index fb4880ca082..77b3e8c30c3 100644 --- a/src/etc/cargo.bashcomp.sh +++ b/src/etc/cargo.bashcomp.sh @@ -39,7 +39,7 @@ _cargo() local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" local opt_pkg_spec='-p --package --all --exclude --workspace' local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' + local opt_feat='-F --features --all-features --no-default-features' local opt_mani='--manifest-path' local opt_parallel='-j --jobs --keep-going' local opt_force='-f --force' diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1 index 80395debf44..45be2c2de13 100644 --- a/src/etc/man/cargo-bench.1 +++ b/src/etc/man/cargo-bench.1 @@ -224,6 +224,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1 index 3197c591cac..f77c71a89e1 100644 --- a/src/etc/man/cargo-build.1 +++ b/src/etc/man/cargo-build.1 @@ -136,6 +136,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1 index 784ac7a2529..f0e68afde6e 100644 --- a/src/etc/man/cargo-check.1 +++ b/src/etc/man/cargo-check.1 @@ -141,6 +141,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1 index d373f0e8fb3..fcae4f4a7dd 100644 --- a/src/etc/man/cargo-doc.1 +++ b/src/etc/man/cargo-doc.1 @@ -114,6 +114,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1 index 8b58f14278b..3ae11adcffa 100644 --- a/src/etc/man/cargo-fix.1 +++ b/src/etc/man/cargo-fix.1 @@ -236,6 +236,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1 index ea8f91edb5f..367fcfdd158 100644 --- a/src/etc/man/cargo-install.1 +++ b/src/etc/man/cargo-install.1 @@ -209,6 +209,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-metadata.1 b/src/etc/man/cargo-metadata.1 index 89a05a79cfd..01cdb51cb40 100644 --- a/src/etc/man/cargo-metadata.1 +++ b/src/etc/man/cargo-metadata.1 @@ -322,6 +322,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1 index 5a10a3dc37c..117d8c9a978 100644 --- a/src/etc/man/cargo-package.1 +++ b/src/etc/man/cargo-package.1 @@ -173,6 +173,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1 index 9626ebd5875..7cf3e7bfddb 100644 --- a/src/etc/man/cargo-publish.1 +++ b/src/etc/man/cargo-publish.1 @@ -123,6 +123,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1 index 33e80374cfa..d19384d8b5a 100644 --- a/src/etc/man/cargo-run.1 +++ b/src/etc/man/cargo-run.1 @@ -47,6 +47,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1 index bb990c9e2f0..10567f2c53c 100644 --- a/src/etc/man/cargo-rustc.1 +++ b/src/etc/man/cargo-rustc.1 @@ -122,6 +122,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1 index d22946936ed..504f8850685 100644 --- a/src/etc/man/cargo-rustdoc.1 +++ b/src/etc/man/cargo-rustdoc.1 @@ -133,6 +133,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index 964c49a735a..a1e32a405c4 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -233,6 +233,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace diff --git a/src/etc/man/cargo-tree.1 b/src/etc/man/cargo-tree.1 index c3bd42862e2..64b7900f5d2 100644 --- a/src/etc/man/cargo-tree.1 +++ b/src/etc/man/cargo-tree.1 @@ -287,6 +287,7 @@ selected package. See \fIthe features documentation\fR for more details. .sp +\fB\-F\fR \fIfeatures\fR, \fB\-\-features\fR \fIfeatures\fR .RS 4 Space or comma separated list of features to activate. Features of workspace