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'