DuckDuckGo in a Shell
The tip
When I go outside my terminal, I am kind of lost. I control everything from my terminal and I hate clicking. That's why I found a small tip today to open a search on DuckDuckGo directly from the terminal. It redirects me to my default browser in the background, which is the expected behavior.
First, I create a function called duckduckgo
:
Note how I (avoid to) deal with quotes in $1
.
Then, I just have to create an alias called ?
:
And here we (duckduck) go!
You can see the commit that adds this to my “shell home framework”.
Oh, and to open the default browser, I use
open (1)
,
like this:
Hope it helps!