tmux: use $terminfo to avoid echoti errors

See https://github.com/robbyrussell/oh-my-zsh/issues/7407#issuecomment-441665143
This commit is contained in:
Marc Cornellà 2018-11-26 19:57:52 +01:00 committed by GitHub
parent e8aba1bf59
commit e780209c33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ alias tkss='tmux kill-session -t'
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color} : ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
# Determine if the terminal supports 256 colors # Determine if the terminal supports 256 colors
if [[ $(echoti colors) == 256 ]]; then if [[ $terminfo[colors] == 256 ]]; then
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else else
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR