From aceb214659f010c2cb713dd19a4e5498b58c2f23 Mon Sep 17 00:00:00 2001 From: Corrado Primier Date: Sun, 30 Dec 2018 15:01:39 +0000 Subject: [PATCH] ssh_to: start a tmux session if none is found --- bin/ssh_to | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ssh_to b/bin/ssh_to index 4d86544..f8c80e9 100755 --- a/bin/ssh_to +++ b/bin/ssh_to @@ -20,8 +20,8 @@ MOSH=`command -v mosh` HOST=${0##/*/} if [[ ! -z $TMUX ]] ; then - echo "Error: tmux session detected, aborting to avoid tmux nesting" + echo "Error: local tmux session detected, aborting to avoid nesting" exit 1 fi -"${MOSH}" -- "${HOST}" tmux a +"${MOSH}" "${HOST}" -- sh -c "tmux a || tmux"