Skip to content

Commit a4ee4da

Browse files
lawrence3699Copilotcarlosala
authored
fix(tmux): treat xterm-direct as 256-color (ohmyzsh#13700)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com> Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
1 parent 7a6357c commit a4ee4da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/tmux/tmux.plugin.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ _build_tmux_alias "tkss" "kill-session" "-t"
8787

8888
unfunction _build_tmux_alias
8989

90-
# Determine if the terminal supports 256 colors
91-
if [[ $terminfo[colors] == 256 ]]; then
90+
# Determine if the terminal supports at least 256 colors
91+
if (( ${+terminfo[colors]} )) && [[ $terminfo[colors] -ge 256 ]]; then
9292
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
9393
else
9494
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR

0 commit comments

Comments
 (0)