dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit a97e4a21abe2e7b525c6e6af5f63df47fc5ec0ad
parent 0bdbb148e5bfe5135abd68d0eb7ee77defb628b0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 28 Feb 2020 11:49:44 +0100

Escape ampersand (&) in search queries

Diffstat:
M.local/bin/search | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.local/bin/search b/.local/bin/search @@ -61,7 +61,7 @@ elif regeximatch "$c" '!yt'; then fi elif regexmatch "$c" ' '; then - plumb "https://duckduckgo.com/?q=$(printf '%s' "$c" | sed 's/+/%2b/g')&kae=d&kau=-1&kao=-1&kap=-1&kaq=-1&kax=-1&kak=-1&kv=-1&kk=-1&k1=-1&kc=-1" + plumb "https://duckduckgo.com/?q=$(printf '%s' "$c" | sed 's/+/%2b/g;s/&/%26/g')&kae=d&kau=-1&kao=-1&kap=-1&kaq=-1&kax=-1&kak=-1&kv=-1&kk=-1&k1=-1&kc=-1" else plumb "http://${c}"