New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help output does not indicate ArgAction::Append
#4681
Comments
More options are being discussed in #3272. Personally, I think |
That's a fair point, but I think it's one of the least offensive options considering the existing output. But yeah I can see how people might struggle to understand its exact purpose, I'm just looking for any indication to the user that this isn't a normal flag. |
This community is likely already aware of it, but there is an IEEE Std 1003.1-2017 for Utility Conventions that describes the argument syntax for standard utilities used throughout POSIX. It covers the use of ellipses:
Granted, this syntax is meant for the |
Quoting myself from that thread
As for that being a cause to use |
Pulling in another idea from #3272 is putting |
Honestly just my 2 cents but I really am not a fan of I think what @maxrake suggested with |
I think context will be important for this thread, so I'm going to ask that any proposal for new output syntax include a mockup of Arguments affected by this discussion include
Current output:$ cargo check -h
Check a local package and all of its dependencies for errors
Usage: cargo check [OPTIONS]
Options:
-q, --quiet Do not print cargo log messages
-p, --package [<SPEC>] Package(s) to check
--workspace Check all packages in the workspace
--exclude <SPEC> Exclude packages from the check
-v, --verbose... Use verbose output (-vv very verbose/build.rs output)
--all Alias for --workspace (deprecated)
--color <WHEN> Coloring: auto, always, never
-j, --jobs <N> Number of parallel jobs, defaults to # of CPUs
--frozen Require Cargo.lock and cache are up to date
--keep-going Do not abort the build as soon as there is an error (unstable)
--lib Check only this package's library
--locked Require Cargo.lock is up to date
--bin [<NAME>] Check only the specified binary
--offline Run without accessing the network
--bins Check all binaries
--config <KEY=VALUE> Override a configuration value
--example [<NAME>] Check only the specified example
-Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
--examples Check all examples
--test [<NAME>] Check only the specified test target
--tests Check all tests
--bench [<NAME>] Check only the specified bench target
--benches Check all benches
--all-targets Check all targets
-r, --release Check artifacts in release mode, with optimizations
--profile <PROFILE-NAME> Check artifacts with the specified profile
-F, --features <FEATURES> Space or comma separated list of features to activate
--all-features Activate all available features
--no-default-features Do not activate the `default` feature
--target <TRIPLE> Check for the target triple
--target-dir <DIRECTORY> Directory for all generated artifacts
--manifest-path <PATH> Path to Cargo.toml
--ignore-rust-version Ignore `rust-version` specification in packages
--message-format <FMT> Error format
--unit-graph Output build graph in JSON (unstable)
--future-incompat-report Outputs a future incompatibility report at the end of the build
--timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json
-h, --help Print help information
Run `cargo help check` for more detailed information. |
Maintainer's note: any proposed syntax should include a mockup of
cargo check -h
(details)Please complete the following tasks
Clap Version
4.1.4
Describe your use case
To my knowledge, the correct way to allow an argument to be specified multiple times is to use
ArgAction::Append
. This correctly allows passing the option multiple times and returns aVec
withget_many
.However, when getting the
--help
output it looks like this:It seems like the
--help
output does not communicate at all that the option can be passed multiple times.Describe the solution you'd like
Considering that
--option <OPTION>...
is already used to indicate that one option can has multiple arguments, the best solution I can see would be--option... <OPTION>
. This would be consistent with--flag...
.Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: