From 99d85659e81922142848c598f4065fd166d0c383 Mon Sep 17 00:00:00 2001 From: Daniel Kolakowski Date: Fri, 7 Nov 2014 00:15:23 +0100 Subject: [PATCH] Enable iTerm integration with TMUX. --- modules/tmux/init.zsh | 8 +++++++- runcoms/zpreztorc | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/tmux/init.zsh b/modules/tmux/init.zsh index e1bb1467..7fe9bfca 100644 --- a/modules/tmux/init.zsh +++ b/modules/tmux/init.zsh @@ -13,6 +13,12 @@ if (( ! $+commands[tmux] )); then return 1 fi +if ( [[ $TERM_PROGRAM = iTerm.app ]] && \ + zstyle -t ':prezto:module:tmux:iterm' integrate \ +); then + ITERM_INTEGRATION=-CC +fi + # # Auto Start # @@ -45,5 +51,5 @@ fi # Aliases # -alias tmuxa='tmux attach-session' +alias tmuxa='tmux $ITERM_INTEGRATION attach-session' alias tmuxl='tmux list-sessions' diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index a54fdb02..6bcefe38 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -152,3 +152,6 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Auto start a session when Zsh is launched in a SSH connection. # zstyle ':prezto:module:tmux:auto-start' remote 'yes' + +# Integrate iTerm with Tmux (see: https://code.google.com/p/iterm2/wiki/TmuxIntegration ) +# zstyle ':prezto:module:tmux:iterm' integrate 'true'