News for hackers. Stuff that matters.
Re:Show HN: Anycomplete by kevinastone on Tuesday November 29, 2016 @06:28PM (#13067129)
Would think jq[0] is more suitable if you're going to install a cli json parser.

[0]: https://stedolan.github.io/jq/

Re:Show HN: Anycomplete by jsrn on Tuesday November 29, 2016 @06:32PM (#13067160)
Here is the command with jq instead of json_pp

    $ curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' | jq . | gsed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p}'
(see my other comment about gsed vs sed)
Re:Show HN: Anycomplete by kevinastone on Wednesday November 30, 2016 @12:08AM (#13068623)
You don't need sed, you can do it all in jq:

    curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' | jq -r '.[1] | .[][0] | sub("</?b>"; ""; "gi")'
Re:Show HN: Anycomplete by eridius on Tuesday November 29, 2016 @07:22PM (#13067418)
Here's the above modified to work with BSD sed:

  curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' | jq . | sed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p;}'
(Edited to remove previous advice about inserting a newline)