Skip to content

Commit 0e59944

Browse files
committed
fix(help): Clarify install's positional
- That a version is accepted - That you are selecting from the source a package which led to part of the confusion in #4830 I wonder if we should rename our `CRATE` value names to `PKG`/`PACKAGE`
1 parent 3e8d49c commit 0e59944

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ pub fn cli() -> Command {
1818
.about("Install a Rust binary. Default location is $HOME/.cargo/bin")
1919
.arg(
2020
Arg::new("crate")
21-
.value_name("CRATE")
21+
.value_name("CRATE[@<VER>]")
22+
.help("Select the package from the given source")
2223
.value_parser(parse_crate)
2324
.num_args(0..),
2425
)

tests/testsuite/cargo_install/help/stdout.log

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Install a Rust binary. Default location is $HOME/.cargo/bin
22

3-
Usage: cargo install [OPTIONS] [CRATE]...
3+
Usage: cargo install [OPTIONS] [CRATE[@<VER>]]...
44

55
Arguments:
6-
[CRATE]...
6+
[CRATE[@<VER>]]... Select the package from the given source
77

88
Options:
99
--version <VERSION> Specify a version to install

0 commit comments

Comments
 (0)