summaryrefslogtreecommitdiff
path: root/url.sh
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-08-04 15:56:22 +0200
committerxengineering <me@xengineering.eu>2022-08-04 15:57:50 +0200
commita4e85dc07d8f5f45e1571fab459d46dff77b2ef8 (patch)
tree5539b7872437d443c0b9762689a7e3fd55833c8b /url.sh
parent184341cb1f894fbee7d9753c9d9b3b78d82abcb4 (diff)
downloadscripts-a4e85dc07d8f5f45e1571fab459d46dff77b2ef8.tar
scripts-a4e85dc07d8f5f45e1571fab459d46dff77b2ef8.tar.zst
scripts-a4e85dc07d8f5f45e1571fab459d46dff77b2ef8.zip
Do not open tab on abort in url.sh
Diffstat (limited to 'url.sh')
-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