Skip to content

Commit

Permalink
Enhance help texts of position args
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Feb 19, 2023
1 parent eff8d69 commit e59ae78
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 e59ae78

Please sign in to comment.