GithubHelp home page GithubHelp logo

how2's Introduction

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/

how2's People

Contributors

santinic avatar paolocifariello avatar danyshaanan avatar magicdawn avatar danielkopi avatar nathanepstein avatar foxboron avatar jericson avatar goibon avatar codyd51 avatar ksaldana1 avatar zippeurfou avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.