Enhance help texts of position args

This commit is contained in:
Weihang Lo 2023-02-19 21:53:53 +00:00
parent eff8d693b9
commit e59ae78bd6
No known key found for this signature in database
GPG key ID: D7DBF189825E82E7
3 changed files with 8 additions and 2 deletions

View file

@ -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),

View file

@ -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")

View file

@ -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",