I would like to create an alias with the function to perform a DuckDuckGo search with W3M via the Command Line Interface (CLI).
I have already created the alias and the DuckDuckGo search engine is called. However, I would also like to enter a search keyword after the alias in the CLI and I do not know how to do that.
Example:
alias duckit="w3m https://lite.duckduckgo.com/lite/"
When I enter the command duckit
in the CLI, this alias calls the DuckDuckGo search engine and opens the web page.
But I want the alias to also enter the search keyword in DuckDuckGo and show me the results.
So I tried adding ?q=
at the end of the alias above:
alias duckit="w3m https://lite.duckduckgo.com/lite/?q="
However, running it as follows does not work:
duckit test
What do I need to do?