summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-09-05 13:46:47 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-09-05 13:46:47 -0700
commit37f4dc20d7dfdecfe618477806bee241bf9ecc55 (patch)
tree7a1cac92b32a562eec95567aec280e173d1fbc64
parent2568c1bff386e02d6f4d4258556cfc2384ac7a75 (diff)
downloaddotfiles-37f4dc20d7dfdecfe618477806bee241bf9ecc55.tar.gz
make 'd' quit ssh-and-tmux so can C-\ d d
-rwxr-xr-xbin/ssh-and-tmux4
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 $session on $host; C-c/C-d to give up .."
+prompt="Press any key to reconnect to tmux session $session on $host; 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