-
-
Notifications
You must be signed in to change notification settings - Fork 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
Too much whitespace in output #3096
Comments
This is intentional IIRC because of #1432 |
Thanks for the context; I had assumed it was done for a reason but hadn't looked yet. I still think this is worth having as an issue as it is a regression. We are balancing competing needs and maybe we can find a third way (without just adding a flag) Granted, once we get proper man generation, it'll lower the reliance on help2man |
This seems like a regression to me as well. Vertical space is precious in help output, especially for commands with lots of options or subcommands. |
Here is an example of what help2man parses
|
Looks ugly enough to stay with the current version of Also, what is the point in having man page that completely mirrors --help output? |
I don't think the intent is to be exactly |
Random notes as I research help2man's docs sound like they want the organization to be
I'm also seeing this pattern in I wonder what we can do to encourage examples From help2man's docs
Interesting. They want the usage to use For us, we show the bin name as the application name (see #992). Our bin name is From help2man's docs
Interesting input for #2808 Now in running clap2 output .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH TEST-CLAP "1" "December 2021" "test-clap 0.1.0" "User Commands"
.SH NAME
test-clap \- manual page for test-clap 0.1.0
.SH DESCRIPTION
test\-clap 0.1.0
Me
From Cargo.toml
.SS "USAGE:"
.IP
test\-clap
.SS "FLAGS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Prints version information
.SH "SEE ALSO"
The full documentation for
.B test-clap
is maintained as a Texinfo manual. If the
.B info
and
.B test-clap
programs are properly installed at your site, the command
.IP
.B info test-clap
.PP
should give you access to the complete manual. clap3 output .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH TEST-CLAP "1" "December 2021" "test-clap 0.1.0" "User Commands"
.SH NAME
test-clap \- manual page for test-clap 0.1.0
.SH DESCRIPTION
test\-clap 0.1.0
.PP
Me
.PP
From Cargo.toml
.SS "USAGE:"
.IP
test\-clap
.SS "OPTIONS:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version information
.SH "SEE ALSO"
The full documentation for
.B test-clap
is maintained as a Texinfo manual. If the
.B info
and
.B test-clap
programs are properly installed at your site, the command
.IP
.B info test-clap
.PP
should give you access to the complete manual. The only difference is the insertion of Between people being able to override the help template (including when just code-genning their man page) and #3174, I'm inclined to revert the template change in #2369, so we go back to the clap2 output. That said, I am all for ideas for overall improvement of the help output! |
The extra whitespace was targeted at machine processing for a subset of users for a subset of runs of CLIs. On the other hand, there is a lot of concern over the extra verbose output. A user can set the help template for man, if desired. They can even do something (env? feature flag?) to make it only run when doing man generation. We also have clap-rs#3174 in the works. So let's focus on the end-user reading `--help`. People wanting to use `help2man` have workarounds to do what they need. Fixes clap-rs#3096
Please complete the following tasks
Rust Version
rustc 1.55.0 (c8dfcfe04 2021-09-06)
Clap Version
3.0.0-rc.0
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run -- --help
Actual Behaviour
Expected Behaviour
Note quite but similar to clap2 which is
Maybe
or
Additional Context
This came from reddit.
Debug Output
No response
The text was updated successfully, but these errors were encountered: