From a4e85dc07d8f5f45e1571fab459d46dff77b2ef8 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 4 Aug 2022 15:56:22 +0200 Subject: Do not open tab on abort in url.sh --- url.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3-70-g09d2