Bubble tea doesn't render colors on tmux over ssh
idvorkin opened this issue · 7 comments
Describe the bug
When using bubble tea on tmux over ssh, there are no colors being rendered. It works fine on ssh without tmux.
Setup
Please complete the following information along with version numbers, if applicable.
- OS: Linux
- Shell: Zsh
- Terminal Emulator: iTerm and Blink
- Terminal Multiplexer: Tmux over ssh and over mosh
To Reproduce
Steps to reproduce the behavior:
- Go to examples/alt-screen (I suspect issues always reproduce here)
- See the red text not rendered in color.
TL;DR to resolve
export COLORTERM=truecolor
Hi! I'm not able to reproduce this, both with and without tmux running locally in addition to remotely. To make sure I'm understanding correctly, can you confirm you're doing the following:
- SSH'ing into a Linux server
- Running
tmux
on the remote server - Running the
examples/alt-screen
Additionally, what is the $TERM
value in your environment in tmux
on the server?
@meowgorithm - Happy to run any diagnostics you'd like. true color works fine in other apps (not based on bubble tea)
edit your ~/.tmux.conf
add
set -g default-terminal "screen-256color"
save file.
restart your tmux.
Oh that fixed it! Hooray. Now I wonder if that messed up something else? This stuff is super fragile :( True Color still works at least!
Can we treat the xterm-256color the same as screen-256color for others?
Sigh, if you screen-256color, that breaks italics. BUT, turns out setting COLORTERM is what iTerm does, and that gives truecolor support.
COLORTERM=truecolor