summaryrefslogtreecommitdiff
path: root/bin/ssh-and-tmux
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-15 15:54:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-16 22:04:29 -0700
commit4c315e05fb1c21e34d5c0e9df13a8d3e250cd711 (patch)
treec0847a445c58bfb117e9be52e760a3850c246528 /bin/ssh-and-tmux
parent3901a5bdfb446b1ebc52deab8451ded49f5972df (diff)
downloaddotfiles-4c315e05fb1c21e34d5c0e9df13a8d3e250cd711.tar.gz
ssh-and-tmux: tweak (re-)connection prompting
Diffstat (limited to 'bin/ssh-and-tmux')
-rwxr-xr-xbin/ssh-and-tmux6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ssh-and-tmux b/bin/ssh-and-tmux
index 3f25f43c..5b8aa7a1 100755
--- a/bin/ssh-and-tmux
+++ b/bin/ssh-and-tmux
@@ -83,13 +83,15 @@ else
# We now die when ssh exits zero, so this feature may be obsolete.
echo -ne "\033]0;tmux $session on $display_host\007"
- prompt="Press any key to (re-)connect to tmux session $session"
- prompt+=" on $display_host; d/C-d/C-c to give up .."
+ prompt="Press any key to retry tmux $session"
+ prompt+=" on $display_host;
+ d/C-d/C-c to give up .. "
while true; do
ssh -t "$host" "${cmd[*]}" && exit
clear
read -n 1 -r -s -p "$prompt" ch
+ clear
[ "$ch" = $'\04' -o "$ch" = d ] && echo && exit
done
fi