Skip to content

Commit

Permalink
tmux: use echoti instead of tput for FreeBSD compatibility
Browse files Browse the repository at this point in the history
Fixes ohmyzsh#7407

FreeBSD's tput needs termcap codes instead of terminfo capnames, so using `tput colors`
has the wrong effect. See ohmyzsh#7407
  • Loading branch information
mcornella authored Nov 16, 2018
1 parent 3d8f2bd commit b1424e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/tmux/tmux.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ alias tkss='tmux kill-session -t'
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}

# Determine if the terminal supports 256 colors
if [[ $(tput colors) == 256 ]]; then
if [[ $(echoti colors) == 256 ]]; then
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
Expand Down

0 comments on commit b1424e2

Please sign in to comment.