diff options
author | Andrew Schwartzmeyer <andrew.schwartzmeyer@gmail.com> | 2013-06-22 15:58:45 -0700 |
---|---|---|
committer | Andrew Schwartzmeyer <andrew.schwartzmeyer@gmail.com> | 2013-06-22 18:20:11 -0700 |
commit | bc65443734ec96ddc8da61c022d630fa8303765a (patch) | |
tree | e116ab50367b5c0a27d7644e642606035e385de5 /plugins | |
parent | 78dba754d183804079474aa2b1390bd96cb67583 (diff) | |
download | zsh-bc65443734ec96ddc8da61c022d630fa8303765a.tar.gz zsh-bc65443734ec96ddc8da61c022d630fa8303765a.tar.bz2 zsh-bc65443734ec96ddc8da61c022d630fa8303765a.zip |
Adding support for iTerm2 tmux integration via option '-CC'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tmux/tmux.plugin.zsh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 465f5b053..5bd946f08 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -14,6 +14,8 @@ if which tmux &> /dev/null [[ -n "$ZSH_TMUX_AUTOQUIT" ]] || ZSH_TMUX_AUTOQUIT=$ZSH_TMUX_AUTOSTART # Set term to screen or screen-256color based on current terminal support [[ -n "$ZSH_TMUX_FIXTERM" ]] || ZSH_TMUX_FIXTERM=true + # Set '-CC' option for iTerm2 tmux integration + [[ -n "$$ZSH_TMUX_ITERM2" ]] || ZSH_TMUX_ITERM2=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 @@ -55,11 +57,11 @@ if which tmux &> /dev/null # Try to connect to an existing session. elif [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] then - \tmux attach || \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session + \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 [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit # Just run tmux, fixing the TERM variable if requested. else - \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` + \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit fi } |