From b26330a3e97084193d2a522c68f0d57e0417fb69 Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com> Date: Sat, 31 Jul 2021 02:30:07 -0300 Subject: [PATCH] fix: firefox should not open with an empty choice --- firefox-quick-keywords/firefox-quick-keywords | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox-quick-keywords/firefox-quick-keywords b/firefox-quick-keywords/firefox-quick-keywords index 16b461c..ceb1c25 100755 --- a/firefox-quick-keywords/firefox-quick-keywords +++ b/firefox-quick-keywords/firefox-quick-keywords @@ -25,9 +25,9 @@ rm $DB CHOICE=$(echo "$OPTIONS" | $CMD -p "Firefox quick open:") # Check choice -URL=$(echo "$CHOICE" | awk '{print $NF}') || exit +URL=$(echo "$CHOICE" | awk '{print $NF}') || exit 0 VALID=$(echo "$OPTIONS" | grep "$URL") -if [ -n "$VALID" ]; then +if [ -n "$VALID" ] && [ -n "$CHOICE" ]; then firefox $URL else exit 0