Show HN: Get help on any Linux command by typing ‘howdoi –’ in your terminal

0
0
Show HN: Get help on any Linux command by typing ‘howdoi –’ in your terminal

Salvage like a flash options to frequent linux linked questions, magnificent inside your terminal by typing
“howdoi [your question]”.

Screenshot

screenshot

Examples

Fast reply

$ howdoi extract a bz2 file

  -j, --bzip2
            filter the archive through bzip2
  tar -xvjf enginsxt.tar.bz2
  
  Provide: https://askubuntu.com/questions/707861/how-to-extract-tar-bz2

Verbose output

$ howdoi -v add a program to cron

  Preserve a shell script in idea to be this type of folders: /and so forth/cron.day after day, /and so forth/cron.hourly, /and so forth/cron.month-to-month or /and so forth/cron.weekly. 
  
  If these should no longer ample for you, you are going to add extra explicit initiatives e.g. twice a month or each 5 minutes. Spin to the terminal and allure:
  
  crontab -e
  
 ...snip
  
  Provide: https://askubuntu.com/questions/2368/how-possess-i-place of living-up-a-cron-job

A pair of outcomes

$ howdoi -n 2 place to a present cloak

 present cloak
 present cloak -S myprogramrunningunderscreen
 present cloak -ls

There are screens on:
    4964.myprogramrunningunderscreen    (05/31/2013 09: 42: 29 PM)    (Detached)
    4874.pts-1.creeper  (05/31/2013 09: 39: 12 PM)    (Detached)

Provide: https://askubuntu.com/questions/302662/reattaching-to-an-existing-show cloak-session

  present cloak -d -r

Provide: https://askubuntu.com/questions/302662/reattaching-to-an-existing-show cloak-session

Programming questions

$ howdoi js hex to int
  hexString = yourNumber.toString(16);
  yourNumber = parseInt(hexString, 16);
  
  Provide: https://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hexadecimal-in-javascript

Utilization

howdoi [-n -v -h -i] — ask

-n		Amount of outcomes (default is 1)
-v		Narrate plump reply (in another case reveals handiest code)
-i		Interactive or REPL mode (worthwhile for hotkey binding)
-h		Reveals this abet

Set up

Merely bustle the subsequent directions (requires PHP 5+).

$ mkdir -p ~/bin && wget https://uncooked.githubusercontent.com/san-kumar/howdoi/grasp/howdoi -O ~/bin/howdoi && chmod +x ~/bin/howdoi
$ sudo ln -s ~/bin/howdoi /usr/native/bin/howdoi

$ howdoi examine my linux model

Interactive or Popup mode

It is a methods more than likely to bustle this open air the terminal interactively by draw of a hotkey binding. It
can furthermore sort out easy programming linked questions too.

popup

(you are going to query questions in a popup too by urgent a hotkey – as described beneath)

Setup hotkey binding

  • Duplicate popup.sh to your ~/bin folder (or the folder during which you’ve got acquired downloaded howdoi script)
  • Velocity chmod +x ~/bin/popup.sh
  • Spin to Settings > Keyboard > Shortcuts and add a recent shortcut to ~/bin/popup.sh
  • Construct a hotkey (e.g. Ctrl+Shift+H) to your recent shortcut.
  • Now press the hotkey and it’s more than likely you will silent discover a popup the place you are going to type your ask!

Suggestions

Confidently it could connect you a while and makes your existence easier. If this is the case, please fragment it alongside along with your friends and provides me feedback here.

Thanks every one who inspired me and voted for this mission on Hacker information. Seeing feedback fancy
these essentially makes the work I’ve save into it worth it and now I possess to own extra such initiatives!

testimonial 1

testimonial 2

Caveats

  • It’s right a fast hack to connect you a pair of clicks. I wrote this in just a pair of hours, so it’s no longer trustworthy.
  • Factual now, it prefers Ubuntu concepts over totally different linux distros.
  • Merely to explain this handiest prints the reply, it could no longer bustle any code to your machine (in case the screenshot presents you the move have an effect on).

Licence

Perl’s Creative Licence

LEAVE A REPLY

Please enter your comment!
Please enter your name here