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. --- scp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scp.sh') diff --git a/scp.sh b/scp.sh index 368b6bf..ca6769b 100755 --- a/scp.sh +++ b/scp.sh @@ -2,7 +2,7 @@ # Allows to select a host to send files to through scp 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