[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 <sorin.ionescu@gmail.com>
This commit is contained in:
parent
8189577772
commit
e5a0e33f1c
@ -15,7 +15,7 @@ fi
|
|||||||
# Auto Start
|
# 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 ) ||
|
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' remote ) ||
|
||||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \
|
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:screen:auto-start' local ) \
|
||||||
); then
|
); then
|
||||||
|
@ -16,7 +16,7 @@ fi
|
|||||||
# Auto Start
|
# 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 ) ||
|
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
||||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||||
); then
|
); then
|
||||||
|
Reference in New Issue
Block a user