From a4f5830903aa92ed79e47a2c0c8f1a92c28a3194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wo=C5=82osowoicz?= Date: Tue, 6 Aug 2013 01:32:50 +0200 Subject: [PATCH] Added Force UTF-8 configuration option. --- plugins/tmux/tmux.plugin.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 3ecc2ac6..cb1a4e51 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -24,7 +24,9 @@ if which tmux &> /dev/null # 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" - + # Run tmux with `[[ "$ZSH_TMUX_FORCEUTF8" == "true" ]] parameter, which makes tmux to fully enable UTF-8 support + # without trying to guess if the current terminal supports it. + [[ -n "$ZSH_TMUX_FORCEUTF8" ]] || ZSH_TMUX_FORCEUTF8="false" # Get the absolute path to the current directory local zsh_tmux_plugin_path="$(cd "$(dirname "$0")" && pwd)" @@ -57,11 +59,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_FORCEUTF8" == "true" ]] && echo '-u'` `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` attach || \tmux `[[ "$ZSH_TMUX_FORCEUTF8" == "true" ]] && echo '-u'` `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$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_FORCEUTF8" == "true" ]] && echo '-u'` `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit fi }