diff options
-rwxr-xr-x | bin/ssh-and-tmux | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ssh-and-tmux b/bin/ssh-and-tmux index 0f39558a..d11c3d73 100755 --- a/bin/ssh-and-tmux +++ b/bin/ssh-and-tmux @@ -12,11 +12,11 @@ host="$1" session="${2:-default}" -prompt="Press any key to reconnect to tmux session [1m$session[0m on [1m$host[0m; C-c/C-d to give up .." +prompt="Press any key to reconnect to tmux session [1m$session[0m on [1m$host[0m; d/C-d/C-c to give up .." while true; do ssh -t "$host" "tmux new-session -A -s $session" clear read -n 1 -r -s -p "$prompt" ch - [ "$ch" = $'\04' ] && exit + [ "$ch" = $'\04' -o "$ch" = d ] && exit done |