diff --git a/bash_tmux.sh b/bash_tmux.sh index 269c669..6ed9e89 100644 --- a/bash_tmux.sh +++ b/bash_tmux.sh @@ -33,7 +33,7 @@ function go_tmux () function auto_tmux () { - if [[ "$TERM" != screen* ]] && [[ -z "$ALREADY_TRIED_STARTING_TMUX" ]]; then + if [[ -n "$PS1" ]] && [[ "$TERM" != screen* ]] && [[ -z "$ALREADY_TRIED_STARTING_TMUX" ]]; then ALREADY_TRIED_STARTING_TMUX=true echo "Switching to tmux, press Ctrl+C to cancel..."; sleep 1s && go_tmux -x