-
-
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
write_long_help is wonky on get_subcommands_mut values #3602
Comments
This is most likely due to an under-developed part of clap. To work around it, you should call #2911 is the issue for improving this. |
Without any activity on this, I'm assuming the solution provided is sufficient. If not, let us know and we can re-open! |
oh yes sorry, I patched around the issue by just "expecting" the wonky output, I haven't had a chance to look at |
`Command::_build_all` started as an internal function for `clap_complete` as a stopgap until clap-rs#2911. Overtime, we've been finding more cases where this function needs to be called, so now we're going to fully embrace it until clap-rs#2911 so people aren't scrared off by the hidden implementation from using it. This was inspired by clap-rs#3602
`Command::_build_all` started as an internal function for `clap_complete` as a stopgap until clap-rs#2911. Overtime, we've been finding more cases where this function needs to be called, so now we're going to fully embrace it until clap-rs#2911 so people aren't scrared off by the hidden implementation from using it. This was inspired by clap-rs#3602 Comptibility: Though this adds a deprecation which we general reserve for minor or major versions, this is enough of a corner case that I'm fine doing this in a patch release.
I've released v3.1.10 with |
Please complete the following tasks
Rust Version
rustc 1.61.0-nightly (458262b13 2022-03-09)
Clap Version
3.1.8
Minimal reproducible code
The main thing is just:
But the "complete" program is all of this:
Steps to reproduce the bug with the above code
Actual Behaviour
The long_help outputs for the subcommands are weirdly different from
myapp subcommand --help
:subcommand ...
instead ofmyapp subcommand ...
Expected Behaviour
It's not obvious why this would produce substantially different output from the "normal" way to get --help on the CLI.
Additional Context
The reason I am doing these crimes is that I have a secret command that mangles the --help output into a usable markdown form to add to the end of a README.md: https://gist.github.com/Gankra/349dcf6732262ed33b2aa216243a75be
Debug Output
No response
The text was updated successfully, but these errors were encountered: