Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Clap wrap help texts automatically #3070

Merged
merged 1 commit into from Oct 6, 2022

Conversation

mgeisler
Copy link
Contributor

@mgeisler mgeisler commented Sep 14, 2022

This makes the rustup help show and other help texts much more readable on my terminal.

This enables the optional wrap_help feature in Clap. For me, rustup help show looks like this without the feature:

image

With wrap_help, I see

image

I find the second much nicer to read. (I'm a fan of wrapping lines, I maintain the underlying Textwrap library used by Clap 馃槃)

This makes the `rustup help show` and other help texts much more
readable on my terminal.
Copy link
Member

@hi-rustin hi-rustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on my macOS. It worked well.
image
Thanks!

@hi-rustin
Copy link
Member

I have a question: does this help for #2920? Because I found it still broken the line.
image

@mgeisler
Copy link
Contributor Author

Hi @hi-rustin, thanks for testing it!

I'm afraid the fix for wrapping URLs was only released in Clap 3.1.16, and Rustup is still using Clap 2.

So perhaps I could work on updating to the new Clap version first?

@mgeisler
Copy link
Contributor Author

Hah, it turns out that @zohnannor has prepared the Clap update already in #3064.

@hi-rustin
Copy link
Member

Hi @hi-rustin, thanks for testing it!

I'm afraid the fix for wrapping URLs was only released in Clap 3.1.16, and Rustup is still using Clap 2.

So perhaps I could work on updating to the new Clap version first?

Got it. Thanks!

@hi-rustin
Copy link
Member

hi-rustin commented Sep 15, 2022

r? @kinnison Could you please take a look? It looks good to me. Thanks!

@hi-rustin hi-rustin merged commit f94717b into rust-lang:master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants