-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bin_name
overrides name
in the help message
#1474
Comments
I second this being a necessary addition. I'm trying to write an extension to cargo (cargo-extension binary name as an example), and in order to have the usage information make sense, the bin name has to be set to "cargo extension", but then that forces the name in the version write out to be "cargo-extension" which is not very descriptive or helpful. Considering cargo itself uses clap I think it makes sense for clap to be fully able to support writing extensions to cargo, and part of that includes allowing the "name" field to take precedence over the "bin-name" field to allow for both an accurate usage example, and a descriptive name. Also, because I noticed the version number in this issue is different, this also equally affects clap v3.0.0-beta.1 which is what I've been developing with. |
Note: Need to check if |
From a comment of mine in #3096
|
We're close enough to when we can start working on 4.0, I'm going to play it safe and push it off to then |
This will mean we won't have an awkard `.exe` in the middle on Windows This means users can have a display name for their application rather than it being dependent on the binary name it was run as This means users can manually set it to use spaces instead of dashes for separating things out. Fixes clap-rs#992 Fixes clap-rs#1474 Fixes clap-rs#1431
This will mean we won't have an awkard `.exe` in the middle on Windows This means users can have a display name for their application rather than it being dependent on the binary name it was run as This means users can manually set it to use spaces instead of dashes for separating things out. Fixes clap-rs#992 Fixes clap-rs#1474 Fixes clap-rs#1431
Maintainer's notes
Rust Version
rustc 1.36.0-nightly (af98304b9 2019-05-11)
Affected Version of clap
2.33
Bug or Feature Request Summary
If I use
bin_name
to override executable name in usage (for something like cargo command),clap
also automatically overridesname
(as well as argument toApp::new
) in the help message. It would be nice to have control over the name, since it appears at the very top of the help message.Expected Behavior Summary
Actual Behavior Summary
Steps to Reproduce the issue
cargo run -- --help
Sample Code or Link to Sample Code
Debug output
Debug Output
The text was updated successfully, but these errors were encountered: