Commit Diff


commit - 7bb538f44fe2e83c810af33436ca585d4be05b2c
commit + 6786d23fb9427663f0d9b1ef408e6772008f2e0b
blob - aeab51f60d992404283553abbd2fc2df3f75ea07
blob + a32a8e1adc60a2b4eb93ce2aef2e79f6204d1f49
--- bin/ws
+++ bin/ws
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-firefox="Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"
+# Firefox ESR so we don't have to chase latest version often
+firefox="Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0"
 
 prog='
 /duckduckgo.com\/y.js/ { next } # skip ads
@@ -17,4 +18,11 @@ prog='
 }
 '
 
+usage="usage: $0 query ..."
+if test $# -eq 0
+then
+	echo $usage
+	exit 1
+fi
+
 curl -s --compressed --data-urlencode "q=$*" -A "$firefox" https://lite.duckduckgo.com/lite/ | awk "$prog"