File tree 34 files changed +66
-46
lines changed
34 files changed +66
-46
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pub fn cli() -> Command {
12
12
)
13
13
. arg (
14
14
Arg :: new ( "args" )
15
+ . value_name ( "ARGS" )
15
16
. help ( "Arguments for the bench binary" )
16
17
. num_args ( 0 ..)
17
18
. last ( true ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ use cargo::ops;
5
5
pub fn cli ( ) -> Command {
6
6
subcommand ( "init" )
7
7
. about ( "Create a new cargo package in an existing directory" )
8
- . arg ( Arg :: new ( "path" ) . action ( ArgAction :: Set ) . default_value ( "." ) )
8
+ . arg (
9
+ Arg :: new ( "path" )
10
+ . value_name ( "PATH" )
11
+ . action ( ArgAction :: Set )
12
+ . default_value ( "." ) ,
13
+ )
9
14
. arg_new_opts ( )
10
15
. arg_registry ( "Registry to use" )
11
16
. arg_quiet ( )
Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ use cargo_util::paths;
16
16
pub fn cli ( ) -> Command {
17
17
subcommand ( "install" )
18
18
. about ( "Install a Rust binary. Default location is $HOME/.cargo/bin" )
19
- . arg ( Arg :: new ( "crate" ) . value_parser ( parse_crate) . num_args ( 0 ..) )
19
+ . arg (
20
+ Arg :: new ( "crate" )
21
+ . value_name ( "CRATE" )
22
+ . value_parser ( parse_crate)
23
+ . num_args ( 0 ..) ,
24
+ )
20
25
. arg (
21
26
opt ( "version" , "Specify a version to install" )
22
27
. alias ( "vers" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use crate::command_prelude::*;
6
6
pub fn cli ( ) -> Command {
7
7
subcommand ( "login" )
8
8
. about ( "Log in to a registry." )
9
- . arg ( Arg :: new ( "token" ) . action ( ArgAction :: Set ) )
9
+ . arg ( Arg :: new ( "token" ) . value_name ( "TOKEN" ) . action ( ArgAction :: Set ) )
10
10
. arg_registry ( "Registry to use" )
11
11
. arg (
12
12
Arg :: new ( "args" )
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ use cargo::ops;
5
5
pub fn cli ( ) -> Command {
6
6
subcommand ( "new" )
7
7
. about ( "Create a new cargo package at <path>" )
8
- . arg ( Arg :: new ( "path" ) . action ( ArgAction :: Set ) . required ( true ) )
8
+ . arg (
9
+ Arg :: new ( "path" )
10
+ . value_name ( "PATH" )
11
+ . action ( ArgAction :: Set )
12
+ . required ( true ) ,
13
+ )
9
14
. arg_new_opts ( )
10
15
. arg_registry ( "Registry to use" )
11
16
. arg_quiet ( )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use cargo_credential::Secret;
6
6
pub fn cli ( ) -> Command {
7
7
subcommand ( "owner" )
8
8
. about ( "Manage the owners of a crate on the registry" )
9
- . arg ( Arg :: new ( "crate" ) . action ( ArgAction :: Set ) )
9
+ . arg ( Arg :: new ( "crate" ) . value_name ( "CRATE" ) . action ( ArgAction :: Set ) )
10
10
. arg (
11
11
multi_opt (
12
12
"add" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use cargo::util::print_available_packages;
6
6
pub fn cli ( ) -> Command {
7
7
subcommand ( "pkgid" )
8
8
. about ( "Print a fully qualified package specification" )
9
- . arg ( Arg :: new ( "spec" ) . action ( ArgAction :: Set ) )
9
+ . arg ( Arg :: new ( "spec" ) . value_name ( "SPEC" ) . action ( ArgAction :: Set ) )
10
10
. arg_quiet ( )
11
11
. arg_package ( "Argument to get the package ID specifier for" )
12
12
. arg_manifest_path ( )
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ pub fn cli() -> Command {
16
16
. about ( "Run a binary or example of the local package" )
17
17
. arg (
18
18
Arg :: new ( "args" )
19
+ . value_name ( "ARGS" )
19
20
. help ( "Arguments for the binary or example to run" )
20
21
. value_parser ( value_parser ! ( OsString ) )
21
22
. num_args ( 0 ..)
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub fn cli() -> Command {
10
10
. about ( "Compile a package, and pass extra options to the compiler" )
11
11
. arg (
12
12
Arg :: new ( "args" )
13
+ . value_name ( "ARGS" )
13
14
. num_args ( 0 ..)
14
15
. help ( "Extra rustc flags" )
15
16
. trailing_var_arg ( true ) ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ pub fn cli() -> Command {
7
7
. about ( "Build a package's documentation, using specified custom flags." )
8
8
. arg (
9
9
Arg :: new ( "args" )
10
+ . value_name ( "ARGS" )
10
11
. help ( "Extra rustdoc flags" )
11
12
. num_args ( 0 ..)
12
13
. trailing_var_arg ( true ) ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use cargo::ops;
7
7
pub fn cli ( ) -> Command {
8
8
subcommand ( "search" )
9
9
. about ( "Search packages in crates.io" )
10
- . arg ( Arg :: new ( "query" ) . num_args ( 0 ..) )
10
+ . arg ( Arg :: new ( "query" ) . value_name ( "QUERY" ) . num_args ( 0 ..) )
11
11
. arg (
12
12
opt (
13
13
"limit" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ pub fn cli() -> Command {
13
13
)
14
14
. arg (
15
15
Arg :: new ( "args" )
16
+ . value_name ( "ARGS" )
16
17
. help ( "Arguments for the test binary" )
17
18
. num_args ( 0 ..)
18
19
. last ( true ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use cargo::ops;
5
5
pub fn cli ( ) -> Command {
6
6
subcommand ( "uninstall" )
7
7
. about ( "Remove a Rust binary" )
8
- . arg ( Arg :: new ( "spec" ) . num_args ( 0 ..) )
8
+ . arg ( Arg :: new ( "spec" ) . value_name ( "SPEC" ) . num_args ( 0 ..) )
9
9
. arg ( opt ( "root" , "Directory to uninstall packages from" ) . value_name ( "DIR" ) )
10
10
. arg_quiet ( )
11
11
. arg_package_spec_simple ( "Package to uninstall" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use cargo_credential::Secret;
6
6
pub fn cli ( ) -> Command {
7
7
subcommand ( "yank" )
8
8
. about ( "Remove a pushed crate from the index" )
9
- . arg ( Arg :: new ( "crate" ) . action ( ArgAction :: Set ) )
9
+ . arg ( Arg :: new ( "crate" ) . value_name ( "CRATE" ) . action ( ArgAction :: Set ) )
10
10
. arg (
11
11
opt ( "version" , "The version to yank or un-yank" )
12
12
. alias ( "vers" )
Original file line number Diff line number Diff line change 1
1
Execute all benchmarks of a local package
2
2
3
- Usage: cargo[EXE] bench [OPTIONS] [BENCHNAME] [-- [args ]...]
3
+ Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [ARGS ]...]
4
4
5
5
Arguments:
6
6
[BENCHNAME] If specified, only run benches containing this string in their names
7
- [args ]... Arguments for the bench binary
7
+ [ARGS ]... Arguments for the bench binary
8
8
9
9
Options:
10
10
--no-run Compile, but don't run benchmarks
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ error: unexpected argument '--keep-going' found
2
2
3
3
tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
4
4
5
- Usage: cargo[EXE] bench [OPTIONS] [BENCHNAME] [-- [args ]...]
5
+ Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [ARGS ]...]
6
6
7
7
For more information, try '--help'.
Original file line number Diff line number Diff line change 1
1
Create a new cargo package in an existing directory
2
2
3
- Usage: cargo[EXE] init [OPTIONS] [path ]
3
+ Usage: cargo init [OPTIONS] [PATH ]
4
4
5
5
Arguments:
6
- [path ] [default: .]
6
+ [PATH ] [default: .]
7
7
8
8
Options:
9
9
--vcs <VCS> Initialize a new repository for the given version control system,
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ error: unexpected argument '--flag' found
2
2
3
3
tip: to pass '--flag' as a value, use '-- --flag'
4
4
5
- Usage: cargo[EXE] init <path >
5
+ Usage: cargo init <PATH >
6
6
7
7
For more information, try '--help'.
Original file line number Diff line number Diff line change 1
1
Install a Rust binary. Default location is $HOME/.cargo/bin
2
2
3
- Usage: cargo[EXE] install [OPTIONS] [crate ]...
3
+ Usage: cargo install [OPTIONS] [CRATE ]...
4
4
5
5
Arguments:
6
- [crate ]...
6
+ [CRATE ]...
7
7
8
8
Options:
9
9
--version <VERSION> Specify a version to install
Original file line number Diff line number Diff line change 1
1
Log in to a registry.
2
2
3
- Usage: cargo[EXE] login [OPTIONS] [token ] [-- [args]...]
3
+ Usage: cargo login [OPTIONS] [TOKEN ] [-- [args]...]
4
4
5
5
Arguments:
6
- [token ]
6
+ [TOKEN ]
7
7
[args]... Additional arguments for the credential provider
8
8
9
9
Options:
Original file line number Diff line number Diff line change 1
1
Create a new cargo package at <path>
2
2
3
- Usage: cargo[EXE] new [OPTIONS] <path >
3
+ Usage: cargo new [OPTIONS] <PATH >
4
4
5
5
Arguments:
6
- <path >
6
+ <PATH >
7
7
8
8
Options:
9
9
--vcs <VCS> Initialize a new repository for the given version control system,
Original file line number Diff line number Diff line change 1
1
Manage the owners of a crate on the registry
2
2
3
- Usage: cargo[EXE] owner [OPTIONS] [crate ]
3
+ Usage: cargo owner [OPTIONS] [CRATE ]
4
4
5
5
Arguments:
6
- [crate ]
6
+ [CRATE ]
7
7
8
8
Options:
9
9
-a, --add <LOGIN> Name of a user or team to invite as an owner
Original file line number Diff line number Diff line change 1
1
Print a fully qualified package specification
2
2
3
- Usage: cargo[EXE] pkgid [OPTIONS] [spec ]
3
+ Usage: cargo pkgid [OPTIONS] [SPEC ]
4
4
5
5
Arguments:
6
- [spec ]
6
+ [SPEC ]
7
7
8
8
Options:
9
9
-q, --quiet Do not print cargo log messages
Original file line number Diff line number Diff line change 1
1
Run a binary or example of the local package
2
2
3
- Usage: cargo[EXE] run [OPTIONS] [args ]...
3
+ Usage: cargo run [OPTIONS] [ARGS ]...
4
4
5
5
Arguments:
6
- [args ]... Arguments for the binary or example to run
6
+ [ARGS ]... Arguments for the binary or example to run
7
7
8
8
Options:
9
9
--ignore-rust-version Ignore `rust-version` specification in packages
Original file line number Diff line number Diff line change 1
1
Compile a package, and pass extra options to the compiler
2
2
3
- Usage: cargo[EXE] rustc [OPTIONS] [args ]...
3
+ Usage: cargo rustc [OPTIONS] [ARGS ]...
4
4
5
5
Arguments:
6
- [args ]... Extra rustc flags
6
+ [ARGS ]... Extra rustc flags
7
7
8
8
Options:
9
9
--print <INFO> Output compiler information without compiling
Original file line number Diff line number Diff line change 1
1
Build a package's documentation, using specified custom flags.
2
2
3
- Usage: cargo[EXE] rustdoc [OPTIONS] [args ]...
3
+ Usage: cargo rustdoc [OPTIONS] [ARGS ]...
4
4
5
5
Arguments:
6
- [args ]... Extra rustdoc flags
6
+ [ARGS ]... Extra rustdoc flags
7
7
8
8
Options:
9
9
--open Opens the docs in a browser after the operation
Original file line number Diff line number Diff line change 1
1
Search packages in crates.io
2
2
3
- Usage: cargo[EXE] search [OPTIONS] [query ]...
3
+ Usage: cargo search [OPTIONS] [QUERY ]...
4
4
5
5
Arguments:
6
- [query ]...
6
+ [QUERY ]...
7
7
8
8
Options:
9
9
--limit <LIMIT> Limit the number of results (default: 10, max: 100)
Original file line number Diff line number Diff line change 1
1
Execute all unit and integration tests and build examples of a local package
2
2
3
- Usage: cargo[EXE] test [OPTIONS] [TESTNAME] [-- [args ]...]
3
+ Usage: cargo test [OPTIONS] [TESTNAME] [-- [ARGS ]...]
4
4
5
5
Arguments:
6
6
[TESTNAME] If specified, only run tests containing this string in their names
7
- [args ]... Arguments for the test binary
7
+ [ARGS ]... Arguments for the test binary
8
8
9
9
Options:
10
10
--doc Test only this library's documentation
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ error: unexpected argument '--keep-going' found
2
2
3
3
tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
4
4
5
- Usage: cargo[EXE] test [OPTIONS] [TESTNAME] [-- [args ]...]
5
+ Usage: cargo test [OPTIONS] [TESTNAME] [-- [ARGS ]...]
6
6
7
7
For more information, try '--help'.
Original file line number Diff line number Diff line change 1
1
Remove a Rust binary
2
2
3
- Usage: cargo[EXE] uninstall [OPTIONS] [spec ]...
3
+ Usage: cargo uninstall [OPTIONS] [SPEC ]...
4
4
5
5
Arguments:
6
- [spec ]...
6
+ [SPEC ]...
7
7
8
8
Options:
9
9
--root <DIR> Directory to uninstall packages from
Original file line number Diff line number Diff line change 1
1
Remove a pushed crate from the index
2
2
3
- Usage: cargo[EXE] yank [OPTIONS] [crate ]
3
+ Usage: cargo yank [OPTIONS] [CRATE ]
4
4
5
5
Arguments:
6
- [crate ]
6
+ [CRATE ]
7
7
8
8
Options:
9
9
--version <VERSION> The version to yank or un-yank
Original file line number Diff line number Diff line change @@ -1614,7 +1614,7 @@ fn inline_version_without_name() {
1614
1614
cargo_process ( "install @0.1.1" )
1615
1615
. with_status ( 1 )
1616
1616
. with_stderr (
1617
- "error: invalid value '@0.1.1' for '[crate ]...': missing crate name before '@'
1617
+ "error: invalid value '@0.1.1' for '[CRATE ]...': missing crate name before '@'
1618
1618
1619
1619
For more information, try '--help'.
1620
1620
" ,
@@ -1844,7 +1844,7 @@ fn install_empty_argument() {
1844
1844
cargo_process ( "install" )
1845
1845
. arg ( "" )
1846
1846
. with_status ( 1 )
1847
- . with_stderr_contains ( "[ERROR] invalid value '' for '[crate ]...': crate name is empty" )
1847
+ . with_stderr_contains ( "[ERROR] invalid value '' for '[CRATE ]...': crate name is empty" )
1848
1848
. run ( ) ;
1849
1849
}
1850
1850
@@ -2455,7 +2455,7 @@ error: unexpected argument '--release' found
2455
2455
2456
2456
tip: `--release` is the default for `cargo install`; instead `--debug` is supported
2457
2457
2458
- Usage: cargo[EXE] install [OPTIONS] [crate ]...
2458
+ Usage: cargo[EXE] install [OPTIONS] [CRATE ]...
2459
2459
2460
2460
For more information, try '--help'.
2461
2461
" ,
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ fn no_argument() {
124
124
. with_stderr_contains (
125
125
"\
126
126
error: the following required arguments were not provided:
127
- <path >
127
+ <PATH >
128
128
" ,
129
129
)
130
130
. run ( ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ error: unexpected argument '--silent' found
50
50
51
51
tip: a similar argument exists: '--quiet'
52
52
53
- Usage: cargo[EXE] run [OPTIONS] [args ]...
53
+ Usage: cargo[EXE] run [OPTIONS] [ARGS ]...
54
54
55
55
For more information, try '--help'.
56
56
" ,
@@ -65,7 +65,7 @@ error: unexpected argument '--silent' found
65
65
66
66
tip: a similar argument exists: '--quiet'
67
67
68
- Usage: cargo[EXE] run [OPTIONS] [args ]...
68
+ Usage: cargo[EXE] run [OPTIONS] [ARGS ]...
69
69
70
70
For more information, try '--help'.
71
71
" ,
You can’t perform that action at this time.
0 commit comments