From 17d38e1b9c7abc590565bdc0817896aa54773e00 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sun, 15 Dec 2019 20:41:51 +0100 Subject: ssh.sh and scp.sh behave propery if fzf is exited. --- ssh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ssh.sh') diff --git a/ssh.sh b/ssh.sh index 50d801f..b020508 100755 --- a/ssh.sh +++ b/ssh.sh @@ -4,7 +4,7 @@ # Port and input for pass are optional hostsfile="$HOME/.hosts" -hostnames="$(sed '/^#.*$/d' < "$hostsfile" | cut -d'#' -f1 | fzf)" +hostnames="$(sed '/^#.*$/d' < "$hostsfile" | cut -d'#' -f1 | fzf)" || exit 0 host="$(grep "$hostnames" < "$hostsfile")" hostname="$(echo "$host" | cut -d'#' -f1)" hostaddress="$(echo "$host" | cut -d'#' -f2)" -- cgit v1.2.1