As a bash (or zsh) function:
ddg ()
{
/usr/bin/w3m "https://duckduckgo.com/lite?q=$*&kd=-1"
}
Note that this enables any bang searches as well, though you'll need to single quote these to avoid attempted history expansion.lite is also my default w3m search bookmark entry.
So:
ddg '!w foo' # Wikipedia article on foo
ddg '!dict foo' # Dictionary search on foo
ddg '!etym foo' # Etymology Dictionary search on foo
Note that if the endpoint itself relies on JS for local search, the bang won't be successful (though DDG will do its bit). Reddit, and HN/Algolia, I'm looking at you.I happened to be running some quick lookups a few days ago while a friend was watching, and they 1) wondered how I was doing that and 2) if they could have a similar feature. Power of the shell.