e780209c33883d0ecab39dd50663e2e1424250c9

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

tmux: use $terminfo to avoid echoti errors

See https://github.com/robbyrussell/oh-my-zsh/issues/7407#issuecomment-441665143

Diff

 1diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
 2index 64687641c8f34a818d0216f265c093d266e7c2e0..2f3c3e79dcfec8282cde752cc530418babb97b36 100644
 3--- a/plugins/tmux/tmux.plugin.zsh
 4+++ b/plugins/tmux/tmux.plugin.zsh
 5@@ -36,7 +36,7 @@ alias tkss='tmux kill-session -t'
 6 : ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
 7 
 8 # Determine if the terminal supports 256 colors
 9-if [[ $(echoti colors) == 256 ]]; then
10+if [[ $terminfo[colors] == 256 ]]; then
11   export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
12 else
13   export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR