Skip to content

Enhance help texts of position args #11740

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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