-
Notifications
You must be signed in to change notification settings - Fork 410
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
π Windows Terminal Preview 1.4: Hyperlinks not working #332
Comments
Hi @daniel-liuzzi, this is cool, I didn't know Windows Terminal was starting to support hyperlinks. Let's try to work out what's going wrong. I think what I'd do first is capture the raw output of delta with hyperlinks. For example, piping
and then if I copy that last line of text, and replace
Are you able to do an experiment along those lines? |
Hey @dandavison, Thanks for the quick response! I'm sorry I forgot to mention earlier that this is PowerShell 7.0.3, so I don't have
Is there a PowerShell equivalent or you meant for me to try this in something like WSL 2? |
Right, I'm not familiar with PowerShell, but anything that will "display non-printing characters" from standard input. In a POSIX environment the standard option would be
|
Funny how that's exactly what I was trying π
When I run But then when I ctrl+click them, this happens: Bummer⦠In any case, here's test.txt. |
I'm seeing the same problem here on macOS. The issue seems to be in the pager. If I do Does delta use a built in pager or does it fall back to less? (which strips the links: gwsw/less#75) |
Can be worked around by passing |
E.g. via |
Hi @torarnv
Hey, that's neat! I don't think I knew about that. Are there any drawbacks to that? I'm confused, maybe I've forgotten the issues involved. If
Yes, delta uses less as its pager. This is what delta's help text currently says (maybe it should be changed to mentioned
|
Reading the
So I'm guessing that the idea behind So your patch to less's I notice the manual also talks about the
But it uses
Ah, I missed that one! Including |
Actually, delta does not use bat in any way. (But delta has borrowed some code from bat for spawning the pager process.) However, as you say, delta does honor the |
Ah of course, that's right. Thanks for explaining that.
OK, that's an interesting idea (tangentially: delta actually makes use of |
Ah, interesting! π A bit confusing yes π
That sounds like a good idea! I don't know if you already pick up |
Good idea, added a comment in the upstream bug. |
OK, done in 31e2661 (not released yet). (Yep, we were already checking |
Thank you! |
I just tried delta 0.4.4 and can confirm the issue is now solved! π To recap, this is what I've done to have delta render hyperlinks in Windows Terminal & PowerShell Core:
Note that clicking hyperlinks still doesn't work, but that's already tracked in microsoft/terminal#7699. Thanks to @dandavison and @torarnv for helping out! |
Just commenting for posterity that I see the same thing on linux with kitty terminal version 0.25.0 and delta version 0.12.1. The |
So I was trying the Hyperlink support in Windows Terminal Preview 1.4 but it doesn't seem to work (hyperlinks source is shown instead of actual links.)
Raw output
Delta output
Other information
If I instead try the "Validation Steps Performed" snippet in microsoft/terminal#7251 (comment), it works as expected:
In case it helps, these are the relevant options in my .gitconfig:
I also added this to my Microsoft.PowerShell_profile.ps1 (as per as per microsoft/terminal#7251)
The text was updated successfully, but these errors were encountered: