how2 finds the simplest way to do something in a unix shell.
It's like man
, but you can query it in natural language:
You can install it via npm:
npm install -g how2
if it gives you EACCES errors, you need to fix npm permissions. Or you can just use sudo npm install -g how2
if you don't care.
Then just install NodeJS.
Install node: sudo apt-get install nodejs npm
Make a symlink: ln -s /usr/bin/nodejs /usr/bin/node
Then install how2: npm install -g how2
Install node with brew: brew install node
.
If you don't have brew, download nodejs from here
Then install how2: npm install -g how2
Your Linux distro (like Ubuntu) probably uses "nodejs" instead of "node".
Make a symlink and it should work:
ln -s /usr/bin/nodejs /usr/bin/node
If you don't specify a language it defaults to Bash unix command line. how2 tries to give you immediately the most likely answer:
After that you can press SPACE to go to the interactive mode, where you can choose a different stackoverflow question/answer.
You can use -l lang
to find answers for other languages:
Yes, you need to use HTTP_PROXY
or HTTPS_PROXY
environment variables.
For example, you could alias the proxy seetings in your ~/.bash_profile
:
alias how2="HTTPS_PROXY='your_proxy:8888' how2"
It uses Google and Stackoverflow APIs, because Stackoverflow search on its own doesn't works as well.
Because I can never remember how to do certain things. And reading man pages always takes too long.
Taken from https://xkcd.com/1168/
- Add automatic copy/paste from -i to command line