From 9aae39482235b9140a4164ab017da4c9a0421bcf Mon Sep 17 00:00:00 2001 From: samogot Date: Wed, 18 Apr 2018 11:28:46 +0300 Subject: [PATCH] Add ZSH_TMUX_UTF8 option to tmux plugin --- plugins/tmux/tmux.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index fb514a44..e586df40 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -27,6 +27,8 @@ if which tmux &> /dev/null [[ -n "$ZSH_TMUX_FIXTERM" ]] || ZSH_TMUX_FIXTERM=true # Set '-CC' option for iTerm2 tmux integration [[ -n "$ZSH_TMUX_ITERM2" ]] || ZSH_TMUX_ITERM2=false + # Set '-u' to force utf8 support + [[ -n "$ZSH_TMUX_UTF8" ]] || ZSH_TMUX_UTF8=false # The TERM to use for non-256 color terminals. # Tmux states this should be screen, but you may need to change it on # systems without the proper terminfo @@ -68,11 +70,11 @@ if which tmux &> /dev/null # Try to connect to an existing session. elif [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] then - \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` attach || \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session + \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_UTF8" == "true" ]] && echo '-u '` attach || \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_UTF8" == "true" ]] && echo '-u '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit # Just run tmux, fixing the TERM variable if requested. else - \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` + \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_UTF8" == "true" ]] && echo '-u '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit fi }