-
-
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
Reuse USAGE from clap in generated man pages #3581
Comments
This was discussed in #3174 (comment) epage:
epage:
epage:
|
Should hidden options be visible in the synopsis section or is that a bug that needs fixing? |
That is a bug. |
btw we might be able to reuse usage formatting in the future. Usage formatting also has a way to force certain arguments to show up without being required. This could offer users a way to customize things (when we make usage generation public). So back to reusing it. Clap has some extensibility limitations around formatting. Users can't provide custom-formatted strings and can't theme clap. We've just not wanted to expose an entire formatting API in clap. If there was another formatting API we could reuse that is fully stable, then we could. We have that, ANSI escape codes. My idea: We could have usage generation output ansi escape codes and parse it and turn it into ROFF Building blocks:
|
Please complete the following tasks
Clap Version
3.1.0
Describe your use case
N/A
Describe the solution you'd like
I would like
clap_manpage
to render the synopsis section similar to how it done in--help
.For reference, this how it looks in
xh --help
And this how the synopsis is rendered in the generated manpage
Alternatives, if applicable
Fortunately,
clap_mangen
is flexible enough when it comes to overriding sections or adding new onesAdditional Context
N/A
The text was updated successfully, but these errors were encountered: