From 76d17a2ad7a18f4c8f098b0915a666d19061ec8f Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Wed, 20 Jul 2016 18:39:10 +0200 Subject: [PATCH] Simplify tmux ssh autostart. --- zsh/.zshrc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 143f438..e9c902b 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,11 +1,9 @@ # If connected over SSH and not already in tmux, start tmux. -if [[ -o interactive ]]; then - if [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then - if tmux has-session &> /dev/null; then - exec tmux attach - else - exec tmux - fi +if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then + if tmux has-session &> /dev/null; then + exec tmux attach + else + exec tmux fi fi