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
Improve indentation of help #940
Comments
Good idea. Depends on the capabilities of clap. Patches welcome. |
I agree that this would be more readable. @kbknapp any chance you would like to adopt such structure and improve output readability in clap? If so, I'd be willing to help. |
@brson I checked clap docs, and did not found this sort of capability (there is only |
I missed this issue somehow, apologies. clap doesn't support this per-se but this should work fine: .after_help("\
DISCUSSION:
Overrides configure rustup to use a specific toolchain when
running in a specific directory.
Directories can be assigned their own Rust toolchain with
`rustup override`. When a directory has an override then
any time `rustc` or `cargo` is run inside that directory,
or one of its child directories, the override toolchain
will be invoked.
To pin to a specific nightly:
rustup override set nightly-2014-12-18
Or a specific stable release:
rustup override set 1.0.0") |
Indent help text Add a DISCUSSION heading to each item and indent (and rewrap) the help text. Fixes #940.
I find the indentation of command like
rustup override
very confusingAt first glance it looks roughly like this
I find that extremely unreadable due to the mix of indented and unindented chunks.
I suggest to adopt the structure of a manpage, i.e. everything is indented except for headlines, which are uppercase.
The example above could look like this
=> Much better IMO. Now I can immediately see what belongs where. :-)
What do you think about this suggestion?
The text was updated successfully, but these errors were encountered: