-
Notifications
You must be signed in to change notification settings - Fork 952
Help text for rustup update
contains a broken URL when line-broken
#2920
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
Comments
If this is a bug in Rustup, it would likely be in the markdown linewrapper we have, which is pretty simplistic, however looking through that code I cannot see how it would ever split a link across multiple lines. As such this is almost certainly a bug in the terminal you are using. If I deliberately cause a link to be split across multiple lines in my terminal, it is still correctly identified as a single link. Is there something we can do to cause Windows terminal to detect the continuation of the link? |
I did some additional testing and the line in question is wrapped so as to break the URL regardless of the width of the terminal window, so it's not Windows Terminal at fault. |
@ketsuban Fascinating. Let me look again. Oh, this isn't help text when running the command, you mean It looks like this is part of the I am able to force the same bad behaviour, so I have filed clap-rs/clap#3222 and we'll see what they say |
Hi @kinnison, I'm the maintainer of Textwrap, the underlying wrapping library used by Clap. I just created a PR (#3070) to enable the |
I just checked the Clap changelog and this fix was released in Clap 3.1.16. Rustup is using Clap 2, so an upgrade will be needed to fix this properly. That upgrade is already prepared in #3064 🎉 |
Problem
Some terminals (including Windows Terminal) provide a mechanism for opening URLs in the default browser when you Ctrl-click on them. The help text for
rustup update
contains the URLhttps://github.com/rust-lang/rustup/wiki/Non-host-toolchains
; however, if this gets broken across two lines the resulting URL ishttps://github.com/rust
orhttps://github.com/rust-
, which don't go where they're supposed to.Steps
rustup help update
.Possible Solution(s)
No response
Notes
Obviously this requires a sufficiently small terminal window to word-wrap the help text.
Rustup version
rustup 1.24.3 (ce5817a94 2021-05-31)
Installed toolchains
The text was updated successfully, but these errors were encountered: