diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-09-05 13:46:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-09-05 13:46:47 -0700 |
commit | 37f4dc20d7dfdecfe618477806bee241bf9ecc55 (patch) | |
tree | 7a1cac92b32a562eec95567aec280e173d1fbc64 | |
parent | 2568c1bff386e02d6f4d4258556cfc2384ac7a75 (diff) | |
download | dotfiles-37f4dc20d7dfdecfe618477806bee241bf9ecc55.tar.gz |
make 'd' quit ssh-and-tmux so can C-\ d d
-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 |