From 245e1350a3928186cb1f48a96e0e903a9d22a30f Mon Sep 17 00:00:00 2001 From: Alexandre Medeiros Date: Mon, 28 Sep 2015 16:59:55 -0300 Subject: [PATCH] tmux: add force 256 color terminal flag Add option to force tmux to assume a 256 colors terminal. --- plugins/tmux/tmux.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 3ea866f2..811b96f0 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -37,6 +37,8 @@ fi # Tmux states this should be screen-256color, but you may need to change it on # systems without the proper terminfo [[ -n "$ZSH_TMUX_FIXTERM_WITH_256COLOR" ]] || ZSH_TMUX_FIXTERM_WITH_256COLOR="screen-256color" +# Force tmux to assume the terminal supports 256 colors. +[[ -n "$ZSH_TMUX_FORCE_256COLOR" ]] || ZSH_TMUX_FORCE_256COLOR=false @@ -60,6 +62,7 @@ fi function _zsh_tmux_plugin_run() { local tmux_cmd tmux_cmd=(command tmux) + [[ "$ZSH_TMUX_FORCE_256COLOR" == "true" ]] && tmux_cmd+="-2" [[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+="-CC" [[ "$ZSH_TMUX_FIXTERM" == "true" ]] && tmux_cmd+=(-f $_ZSH_TMUX_FIXED_CONFIG) if [[ -n "$@" ]]; then