Don't attempt to enter screen/tmux environment when in Emacs
If launching Emacs from outside an interactive shell (say from Upstart, Gnome3, an OS X .app bundle), $TMUX and $STY won't be set. We shouldn't launch ssh/tmux when running emacs, because emacs can't handle the termcaps of such multiplexers. Emacs sets $INSIDE_EMACS and (on older versions) $EMACS, so if those are set we won't attempt to autostart a tmux/screen session.
This commit is contained in:
parent
8189577772
commit
7c33f7d24d
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ fi
|
||||||
# Auto Start
|
# Auto Start
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$STY" ]] && ( \
|
if [[ -z "$STY" && ( -n "$INSIDE_EMACS" || -n "$EMACS") ]] && ( \
|
||||||
( [[ -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 "$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
|
||||||
|
|
Loading…
Add table
Reference in a new issue