Can we drop the q= and the quotes from the shell cmd somehow, that would make it so much nicer, and rip is a great command line.
apt install curl jq
pip3 install jtbl
curl -O https://raw.githubusercontent.com/alangibson/dontbeevil.rip/...
chmod u+x rip
./rip 'what is a monad'
rip() {
curl \
--data-urlencode "q=${1}" \
--get \
--header 'Content-Type: application/json' --header 'Accept: application/json' \
--silent \
'https://dontbeevil.rip/search' \
| jq '[ .hits.hits[] | { title: .fields.title[0], url: .fields.url[0], highlight: .highlight.text[0] } ]'
}$ rip() { curl -G -H "Accept: text/plain" --url https://dontbeevil.rip/search --data-urlencode "q=$*"; }
$ rip Heartbleed bug
edit: alangibson's solution in this thread is better :)