Skip to content

Commit

Permalink
Auto merge of #11740 - weihanglo:issue/9707, r=epage
Browse files Browse the repository at this point in the history
Enhance help texts of position args
  • Loading branch information
bors committed Feb 20, 2023
2 parents 9608f69 + e59ae78 commit 6e66ee8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/bin/cargo/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub fn cli() -> Command {
.arg_quiet()
.arg(
Arg::new("args")
.help("Arguments for the binary or example to run")
.value_parser(value_parser!(std::ffi::OsString))
.num_args(0..)
.trailing_var_arg(true),
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn cli() -> Command {
.arg(
Arg::new("args")
.num_args(0..)
.help("Rustc flags")
.help("Extra rustc flags")
.trailing_var_arg(true),
)
.arg_package("Package to build")
Expand Down
7 changes: 6 additions & 1 deletion src/bin/cargo/commands/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ pub fn cli() -> Command {
subcommand("rustdoc")
.about("Build a package's documentation, using specified custom flags.")
.arg_quiet()
.arg(Arg::new("args").num_args(0..).trailing_var_arg(true))
.arg(
Arg::new("args")
.help("Extra rustdoc flags")
.num_args(0..)
.trailing_var_arg(true),
)
.arg(flag(
"open",
"Opens the docs in a browser after the operation",
Expand Down

0 comments on commit 6e66ee8

Please sign in to comment.