diff options
Diffstat (limited to 'shell')
-rwxr-xr-x | shell | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -18,10 +18,15 @@ if [ "$BASENAME" == "shells" ]; then else autossh $DEST -t -- screen -x $COMMAND fi -elif [ "$BASENAME" == "shelll" ]; then - # Local screen shell - wscreen $* else - # Remote shell using autossh - autossh $DEST -t -- $COMMAND + if [ -z "$COMMAND" ] && screen -ls $DEST | grep -q "There is a screen on"; then + # Local existing screen shell + wscreen $DEST + elif [ "$DEST" == "local" ]; then + # Local screen shell + wscreen $COMMAND + else + # Remote shell using autossh + autossh $DEST -t -- $COMMAND + fi fi |