summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xurl.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/url.sh b/url.sh
index c0e1e6b..c947ac4 100755
--- a/url.sh
+++ b/url.sh
@@ -44,6 +44,13 @@ selection="$(echo "${line}" | awk -F '\t' '{print $1}')"
if [ "${selection}" = "${closer}" ]
then
exit 0
+
+# exit if nothing is selected
+elif [ "${selection}" = "" ]
+then
+ exit 0
+
+# open selected URL in browser
else
firefox "${selection}"
fi