be73666f34c3a2762d606be7f1997b120929e17c

Author
Peter Mosmans <support@go-forward.net>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

tmux: add support for forced unicode support (#5166)

When ZSH_TMUX_UNICODE=true then tmux is informed that UTF-8 is supported.

Closes #5166

Diff

 1diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
 2index dad3db57838aedf6daba16adfb196684b84521a5..e52443a717cb160c101af7abda04a7ef88c01de5 100644
 3--- a/plugins/tmux/tmux.plugin.zsh
 4+++ b/plugins/tmux/tmux.plugin.zsh
 5@@ -36,6 +36,8 @@ alias tkss='tmux kill-session -t'
 6 : ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
 7 # Set the configuration path
 8 : ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
 9+# Set -u option to support unicode
10+: ${ZSH_TMUX_UNICODE:=false}
11 
12 # Determine if the terminal supports 256 colors
13 if [[ $terminfo[colors] == 256 ]]; then
14@@ -62,6 +64,7 @@ function _zsh_tmux_plugin_run() {
15   local -a tmux_cmd
16   tmux_cmd=(command tmux)
17   [[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
18+  [[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
19 
20   # Try to connect to an existing session.
21   [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach