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
long_help() output includes output from long_version() instead of short_version() #3215
Comments
Could you expand on why you consider it a bug for us to show the long version when we also show the long help? |
Some CLI apps i.e ripgrep, include more output such as "enabled features" in the long version. And because Clap 2.x used the short version everywhere, there weren't any issues with that. |
Ok, so this was a change of behavior from clap2 that you are concerned about. Looks like this changed in #2369 without any direct acknowledgement (even says "version output is unchanged"). A reviewer did comment on it, just saying "Nice catch, adding a regression test would be great.". @ldm0 any further background on why you were thinking its good for Still unsure of my thoughts. I wonder if this might be a case similar to #3193. In that, we only show short subcommand help, deferring to the subcommand's help for more details. Here, it might make sense for us to show the short version, deferring to the long version for more details. |
@BurntSushi as someone who uses long-version, what are your thoughts on long help ( During clap3, |
When we got clap-rs#3193, we decided in clap-rs#3196 that `--help` will give a summary for other commands (`subcmd --help` in this case) but not show the long version of the output for that other command. Now with clap-rs#3215, I think the case is similar for `--help` not showing the long version but instead preferring the short version and encouraging people to run `--version`. Originally. clap only showed the short version or nothing. This was changed in clap-rs#2369 without fanfare to prefer the long version over short. Now are we preferring short version over the long version always, just like all other help. Fixes clap-rs#3215
Please complete the following tasks
Rust Version
rustc 1.56.0 (09c42c458 2021-10-18)
Clap Version
3.0.0-rc.8
Minimal reproducible code
Steps to reproduce the bug with the above code
Actual Behaviour
Help output includes
+native-tls
because it uses the output from--version
rather than-V
Expected Behaviour
Additional Context
This bug only occurs when I set the long description for Clap.It happens every time the long help is outputted.Debug Output
No response
The text was updated successfully, but these errors were encountered: