From 4c315e05fb1c21e34d5c0e9df13a8d3e250cd711 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 15 Oct 2022 15:54:28 -0700 Subject: ssh-and-tmux: tweak (re-)connection prompting --- bin/ssh-and-tmux | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/ssh-and-tmux') 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 -- cgit v1.2.3