1
0
Fork 0

Enable iTerm2 tmux integration

Signed-off-by: Sorin Ionescu <sorin.ionescu@gmail.com>
pull/723/head
Daniel Kolakowski 10 years ago committed by Sorin Ionescu
parent 3cb1f7c4c9
commit 00a5639e65

@ -30,6 +30,15 @@ in *tmux.conf*:
set-option -g destroy-unattached [on | off]
#### iTerm2 Integration
[iTerm2][6] offers significant integration with tmux. This can be enabled by
adding the following line to *zpreztorc*:
zstyle ':prezto:module:tmux:iterm' integrate 'yes'
Read [iTerm2 and tmux Integration][7] for more information.
Aliases
-------
@ -64,3 +73,5 @@ Authors
[3]: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
[4]: https://github.com/mxcl/homebrew
[5]: https://github.com/sorin-ionescu/prezto/issues
[6]: http://iterm2.com
[7]: https://code.google.com/p/iterm2/wiki/TmuxIntegration

@ -17,6 +17,12 @@ fi
# Auto Start
#
if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
zstyle -t ':prezto:module:tmux:iterm' integrate \
); then
_tmux_iterm_integration='-CC'
fi
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
@ -32,12 +38,12 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
fi
# Attach to the 'prezto' session or to the last session used.
exec tmux attach-session
exec tmux "$_tmux_iterm_integration" attach-session
fi
#
# Aliases
#
alias tmuxa='tmux attach-session'
alias tmuxa="tmux $_tmux_iterm_integration attach-session"
alias tmuxl='tmux list-sessions'

@ -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 with iTerm2.
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'

Loading…
Cancel
Save