mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-28 07:50:09 +08:00
tmux: use echoti instead of tput for FreeBSD compatibility
Fixes #7407 FreeBSD's tput needs termcap codes instead of terminfo capnames, so using `tput colors` has the wrong effect. See #7407
This commit is contained in:
parent
3d8f2bda59
commit
b1424e2893
@ -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 [[ $(tput colors) == 256 ]]; then
|
if [[ $(echoti 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
|
||||||
|
Loading…
Reference in New Issue
Block a user