From ea41b37b0448bae5fb2c03c25806e6d3721348ac Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire Date: Sun, 30 Jan 2022 02:47:22 -0300 Subject: [PATCH] exclude all keywords starting with `!` the reason for this is because I have a lot of keywords acting as search engines inside firefox, such as arch packages search and macmillan search. If I didnt filter those, the prompt would be flooded with repetitive and nonsense items. --- firefox-quick-keywords/firefox-quick-keywords.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox-quick-keywords/firefox-quick-keywords.sh b/firefox-quick-keywords/firefox-quick-keywords.sh index 48cac7b..d07c409 100755 --- a/firefox-quick-keywords/firefox-quick-keywords.sh +++ b/firefox-quick-keywords/firefox-quick-keywords.sh @@ -16,7 +16,7 @@ cp ~/.mozilla/firefox/*.default-release/places.sqlite $DB # SQL QUERY="SELECT moz_keywords.keyword, moz_places.url FROM moz_keywords left JOIN moz_places ON place_id=moz_places.id WHERE moz_places.url<>'' AND moz_keywords.keyword<>''" -OPTIONS=$(sqlite3 $DB "$QUERY" | awk -F "|" '{print "["$1"] - "$NF}') +OPTIONS=$(sqlite3 $DB "$QUERY" | awk -F "|" '{print "["$1"] - "$NF}' | awk '! /^\[!.*$/') # Clean tmp rm $DB