mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 16:43:08 +01:00
Check if selection != 'user aborted'
This commit is contained in:
parent
9440b57d09
commit
662ebf0182
6
gumssh
6
gumssh
@ -24,9 +24,9 @@ done < "${SSH_CONFIG}"
|
||||
|
||||
# Print each member of logins array on a new line and pipe to gum choose.
|
||||
# Store selection.
|
||||
selection=$(printf "%s\n" "${hostn_array[@]}" | gum choose --limit=1)
|
||||
selection=$(printf "%s\n" "${hostn_array[@]}" | gum choose --header="SSH Host" --limit=1)
|
||||
|
||||
# If $selection is non-empty, pass it to the ssh -X command.
|
||||
if test -n "${selection}"; then
|
||||
# If $selection is not aborted by user, pass it to the `autossh -M 0` command.
|
||||
if [ "${selection}" != "user aborted" ]; then
|
||||
autossh -M 0 "${selection}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user