Don't select wildcard entry

This commit is contained in:
Jeffrey Serio 2024-08-18 20:29:54 -05:00
parent 453bc5694d
commit 5603e42817

2
gumssh
View File

@ -16,7 +16,7 @@ hostn_array=()
# Read HostNames from ssh config and store them in hostn_array.
while IFS= read -r line; do
if [[ "$line" == *"Host "* ]]; then
if [[ "$line" == *"Host "* ]] && [[ "$line" != *"Host *" ]]; then
hostn=$(echo "$line" | awk '{ print $2 }')
hostn_array+=("$hostn")
fi