bubbletea icon indicating copy to clipboard operation
bubbletea copied to clipboard

Colors not rendered over ssh for specific terminal emulators

Open SufyanDahalan opened this issue 3 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

Setup Please complete the following information along with version numbers, if applicable.

  • OS NixOS 22.11
  • Shell zsh, bash
  • Terminal Emulator alacritty, xterm
  • Terminal Multiplexer tried once with zellij and once without a multiplexer

To Reproduce Steps to reproduce the behavior:

  1. connect to a machine via ssh
  2. Run example/list-simple or example/list-fancy
  3. Colors (purple in this case) are not rendered

Source Code examples of this commit hash 29254a08f1458a1ba43db4d2b902982f10758c71

Expected behavior Colors get rendered

Screenshots image

Additional context The local TTY works correctly. The colored shell prompt on the remote machine also work correctly. go version go1.19.3 linux/amd64, on both local and remote machine. Using Konsole or gnome-terminal terminal emulator colors get rendered correctly, looks like the problem is tied to alacritty+ssh

SufyanDahalan avatar May 02 '23 10:05 SufyanDahalan

What are the values of your TERM and COLORTERM env vars?

muesli avatar May 02 '23 10:05 muesli

ssh+Konsole (working): TERM="xterm-256color", COLORTERM not set ssh+alacritty (not working): TERM="alacritty", COLORTERM not set

I will set my TERM to xterm-256colors in my config, this seems to fix it for zsh.

I noticed however that this does'nt fix the issue for powershell 7.2.4. Tried it twice, once with TERM set to screen-256color, another time with TERM="xterm-256color". Both times in Konsole

SufyanDahalan avatar May 02 '23 15:05 SufyanDahalan

Just found the fix for powershell set env:TERM to xterm-256color, not TERM

SufyanDahalan avatar May 02 '23 15:05 SufyanDahalan