Skip to content

Instantly share code, notes, and snippets.

@antonalekseev
Last active December 15, 2019 18:35
Show Gist options
  • Select an option

  • Save antonalekseev/7e0cf1dfb582d4a5682237deb0514fcf to your computer and use it in GitHub Desktop.

Select an option

Save antonalekseev/7e0cf1dfb582d4a5682237deb0514fcf to your computer and use it in GitHub Desktop.
Convert firefox search engines to format used by vimium
# Convert firefox search engines to format used by vimium
# Get mozlz4a from https://gist.github.com/Tblue/62ff47bef7f894e92ed5
mozlz4a -d search.json.mozlz4 search.json
jq -r '.engines[] | [ ._metaData.alias + ":" , ( [._urls[] | select(.template | contains("searchTerms")) ][0].template | if . == null then "none" else . end | sub("{searchTerms}"; "%s") ), ._name ] | join(" ")' < search.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment