how2

stackoverflow from the terminal

  • 所有者: santinic/how2
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

how2: stackoverflow from the terminal

NPM Version

how2 finds the simplest way to do something in a unix shell.
It's like man, but you can query it in natural language:

Demo of using how2

Install

You can install it via npm:

npm install -g how-2

if it gives you EACCES errors, you need to fix npm permissions. Or you can just use sudo npm install -g how-2 if you don't care.

Usage

If you don't specify a language it defaults to Bash unix command line.
how2 tries to give you immediately the most likely answer:

how2 unzip bz2

After that you can press SPACE to go to the interactive mode, where you can choose a different stackoverflow question/answer.

how2 interactive mode

how2 interactive mode 2

You can use -l lang to find answers for other languages:

-l python

Copy-Paste with mouse

When you are in "interactive mode" (after you press SPACE), if you want to copy-paste more than one line you can use block-select:

With Ubuntu try holding Ctrl+Alt before you select, or Alt+Cmd if you're in iTerm on Mac.

(thanks to @danielkop for this suggestion).

Can i use it behind Proxy ?

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"

How does it work?

It uses Google and Stackoverflow APIs, because Stackoverflow search on its own doesn't
works as well.

Why?

Because I can never remember how to do certain things. And reading man pages always takes too long.

XKCD

Taken from https://xkcd.com/1168/

主要指標

概覽
名稱與所有者santinic/how2
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2016-02-13 14:42:16
推送於2023-03-15 06:25:21
最后一次提交2022-10-28 09:56:41
發布數4
最新版本名稱v3.0.3 (發布於 )
第一版名稱v3.0.0-beta (發布於 )
用户参与
星數5.8k
關注者數61
派生數151
提交數233
已啟用問題?
問題數73
打開的問題數2
拉請求數22
打開的拉請求數3
關閉的拉請求數24
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?