From 189cd1165454dc4b875e1874ef385c41928c2a5e Mon Sep 17 00:00:00 2001 From: James Bunton Date: Thu, 18 Jun 2020 23:37:24 +1000 Subject: [PATCH] ssh-screen-wrapper: more flexible line matching --- hacks/ssh-screen-wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacks/ssh-screen-wrapper b/hacks/ssh-screen-wrapper index 662f08c..fe083cc 100755 --- a/hacks/ssh-screen-wrapper +++ b/hacks/ssh-screen-wrapper @@ -6,7 +6,7 @@ hostname="$(basename "$0")" local_hostname="${hostname}.localnet" public_hostname="p${hostname}" -if grep -q "^Host ${hostname}$" ~/.ssh/config; then +if grep -Eq "^Host ${hostname}\b" ~/.ssh/config; then true elif ping -c1 -t1 "$local_hostname" &> /dev/null; then hostname="$local_hostname" -- 2.39.2