diff options
author | 15cm <sinkerine@gmail.com> | 2017-04-26 15:56:50 +0800 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-08-18 21:00:43 +0200 |
commit | ff6b4c835be54a9529a88849b83284aee61a7126 (patch) | |
tree | 10e8b288138fd95264a7b005824ecbf868964eae /plugins | |
parent | a52a5fb1f4a5ca4bacc67e117872cfc4eb1d6417 (diff) | |
download | zsh-ff6b4c835be54a9529a88849b83284aee61a7126.tar.gz zsh-ff6b4c835be54a9529a88849b83284aee61a7126.tar.bz2 zsh-ff6b4c835be54a9529a88849b83284aee61a7126.zip |
tmux: do not auto-load tmux inside of Emacs/Vim
When Emacs and Vim are launched from outside of an interactive shell,
$TMUX and $STY are not set; check for Emacs and Vim environment
variables instead.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tmux/tmux.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 4a7986389..7ddf42099 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -80,7 +80,7 @@ compdef _tmux _zsh_tmux_plugin_run alias tmux=_zsh_tmux_plugin_run # Autostart if not already in tmux and enabled. -if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" ]]; then +if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" ]]; then # Actually don't autostart if we already did and multiple autostarts are disabled. if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then export ZSH_TMUX_AUTOSTARTED=true |