From e5a0e33f1c6ee95159f9c765ef5dae842b07d389 Mon Sep 17 00:00:00 2001 From: Gaelan D'costa Date: Mon, 17 Feb 2014 17:57:34 -0500 Subject: [PATCH] [Fix #541] Do not auto-load screen/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. Signed-off-by: Sorin Ionescu --- modules/screen/init.zsh | 2 +- modules/tmux/init.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/screen/init.zsh b/modules/screen/init.zsh index f10efb7..0d511bf 100644 --- a/modules/screen/init.zsh +++ b/modules/screen/init.zsh @@ -15,7 +15,7 @@ fi # Auto Start # -if [[ -z "$STY" ]] && ( \ +if [[ -z "$STY" && ( -n "$INSIDE_EMACS" || -n "$EMACS" || -n "$VIM" ) ]] && ( \ ( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' remote ) || ( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \ ); then diff --git a/modules/tmux/init.zsh b/modules/tmux/init.zsh index a59b259..b048d2e 100644 --- a/modules/tmux/init.zsh +++ b/modules/tmux/init.zsh @@ -16,7 +16,7 @@ fi # Auto Start # -if [[ -z "$TMUX" ]] && ( \ +if [[ -z "$TMUX" && ( -n "$INSIDE_EMACS" || -n "$EMACS" || -n "$VIM" ) ]] && ( \ ( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) || ( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \ ); then