commit 2e38eef
hovercats
·
2024-11-11 18:13:08 +0000 UTC
parent f27ab50
dsearch: print a message before exit if no query is entered
1 files changed,
+1,
-1
+1,
-1
1@@ -10,5 +10,5 @@ ENGINE='https://duckduckgo.com/?q='
2 # Spaces are not allowed, so substitute them to correct string
3 STRING=`{printf '' | dmenu -c -p 'Search' | sed 's/ /%20/g'}
4
5-if (~ $#STRING 0) exit 1
6+if (~ $#STRING 0) printf 'Usage: dsearch: query\n' exit 1
7 if not exec $BROWSER $ENGINE$STRING