Skip to content

Commit

Permalink
[Fix sorin-ionescu#541] Do not auto-load screen/tmux inside of Emacs/Vim
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
RobotDisco authored and sorin-ionescu committed Feb 18, 2014
1 parent 8189577 commit e5a0e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/screen/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/tmux/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5a0e33

Please sign in to comment.