summaryrefslogtreecommitdiff
path: root/search
blob: 7c8c77aeee6d3da0f64d23dd63262d47711e44bf (plain) (blame)
1
2
3
4
5
6
#!/bin/sh
q="$(printf "%s\n%s\n" "$(xclip -o | head -n1)" "$(xclip -o -selection clipboard | head -n1)" | choose 'search>' | tr '\n' '\0' | xargs -0 uriescape | sed 's/&/%26/g;s/#/%23/g')"
if [ ! "$q" ];then
  exit 1
fi
exec uristart "search:?q=$q"