Closed d-r-a-b closed 1 year ago
the conpty layer of windows doesn't support undercurl, and effectively strips it from the output:
If you use wezterm ssh
or wezterm's multiplexing feature to connect directly to the linux environment, you can bypass conpty and see your undercurl
ah I see. Thank you for the quick reply!
closing the issue
I've really got to say, the documentation for this project is top-notch.
Anyone who finds this issue will be well-served by https://wezfurlong.org/wezterm/what-is-a-terminal.html#terminal-emulators-and-ptys for a conceptual understanding of the role of ConPTY in wezterm and other terminal emulators running on Windows. Scroll up for even more context if the linked section doesn't make sense to you.
@d-r-a-b I have actually been stuck in configuring this direct connection to the Linux layer. Could you perhaps elaborate on how you manage to connect to wsl directly? Did you use wezterm ssh
or the multiplexing feature?
For wezterm ssh
, I tried hosting a ssh server inside the wsl instance, then connecting to it using wezterm ssh USERNAME@localhost
. This successfully connects to the wsl instance, but the undercurl issue still persists
The multiplexing feature seems interesting, but I was quite confused by the guide. What does it means to have the configuration inside the wsl and in win32 as well? Does it mean I need to have wezterm installed in both windows and wsl? (I'm using wsl2 by the way, and I tried setting the proxy command
proxy_command = { 'nc', '-U', '/Users/wez/.local/share/wezterm/sock' },
but it also does not work).
EDIT: Actually using the snippet in the FAQ works for wezterm ssh
. However, do you know if there is any other way than this? Having to turn on the ssh server is rather inconvenient.
However, do you know if there is any other way than this? Having to turn on the ssh server is rather inconvenient.
No, I doubt there is any better method at this moment. The true fix will be ConPTY not filtering out these escape sequences. See my comment with link to the documentation above for why this is so. See also the maintainer's reply to my initial post, linking to the relevant microsoft/terminal
issue.
I see... I just thought there is some other way using the multiplexing feature, as mentioned in here (for wsl2 then we can add the nc
for ProxyCommand
mentioned shortly before in the link.
So you are using wezterm ssh
to connect to the ssh server inside the wsl instance, is that correct?
I already knew what would be involved in running a ssh server and decided it wasn't worth it for undercurl support in my case. I am unclear on the status of multiplexing through unix sockets on WSL2. However, in the page you linked:
This example shows a redundant use of nc (netcat) to connect to the unix socket path on my mac. This isn't useful on its own [emphasis mine], but may help with the WSL 2 issue mentioned below when translated to an appropriate invocation of netcat/socat on Windows:
Note: this only works with WSL 1. WSL 2 doesn't support AF_UNIX interop
I haven't explored this deeply; you may find a way to make it work but I have no real further info at this time. It would be really cool if you do figure it out.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20230421-075330-e0a92c73
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
Read the FAQ on undercurl at https://wezfurlong.org/wezterm/faq.html?h=undercurl#how-do-i-enable-undercurl-curly-underlines and it seemed like undercurl has been supported/working for a while. When I tried it, however, I didn't have any luck.
Happens on stable and latest nightly. I'm sure I must be doing something wrong, but I can't figure it out. I tried
return {}
in my.wezterm.lua
to make sure that it wasn't a weird config thing that I was setting too.To Reproduce
wsl ~
Configuration
return {}
Expected Behavior
I see undercurl
Logs
No logfile in $HOME/.local/share/wezterm
Anything else?
No response