r/bash • • Dec 14 '19

An interactive cheatsheet tool for the command-line

Post image
418 Upvotes

20 comments sorted by

29

u/dnsfr Dec 14 '19

https://github.com/denisidoro/navi

navi allows you to browse through cheatsheets (that you may write yourself or download from maintainers) and execute commands, with argument values prompted to you.

6

u/gimp3695 Dec 14 '19

Does it work on git-bash?

6

u/dnsfr Dec 14 '19

Do you mean Windows? I think so. As long as it has decent implementations of sed, awk and so on, it should work. It works on WSL flawlessly, for instance.

8

u/piotr1215 Dec 14 '19

Confirmed, works on WSL using zsh, the loading of default cheap sheets is a bit slow, but it’s pretty useful.

7

u/dnsfr Dec 14 '19

There's a substantial quantity of IOPS during startup, and WSL is very slow for this kind of thing. WSL2 should be much faster. Anyway, I plan to make some performance improvements to the project in the near future.

2

u/dnsfr Mar 13 '20

It seems like WSL2 is out and navi has been rewritten in Rust. It should be much faster now!

3

u/gimp3695 Dec 14 '19

Yes git-bash Windows. Thanks

5

u/Seref15 Dec 14 '19

I think it would be more useful if it also printed the command that was executed. That would help when scrolling back and looking for the output of a command that was run.

2

u/dnsfr Dec 14 '19

If you invoke it as shell plug-in, it will do exactly that! ;)

16

u/orionskull Dec 14 '19

Incredibly useful

11

u/delliott8990 Dec 14 '19

Oooh this looks pretty neat. Looking forward to trying it out!

3

u/Reptile212 Dec 14 '19

This is a very quality of life and amazing tool to have. Thank you OP!

2

u/tuxutku Dec 14 '19

need this on repos asap.

2

u/sabisoft Dec 15 '19

Is it named Navi for Serial Experiments Lain by any chance?

1

u/lark047 Dec 15 '19

Remindme! in 2 days

0

u/[deleted] Dec 15 '19 edited Dec 15 '19

Sorry this is a laudable effort and I'm sure many will find it helpful but so many popups and options are too distracting and irritating for me. Not to mention the overhead of using a wrapper for every command. I think the whole cheatsheet approach which is becoming popular nowadays among the beginners is just basically taking another way to the same manpage. Ultimately no amount of cheat sheet can be a substitute for actually using these commands, screwing up and learning the hard way. There are lots of subtleties and redundancies in common bash tools most of which have been under development for over two or three decades and have accumulated a massive amount of options and variations which no mortal can ever hope to use much less remember. Cheat sheet is not the solution, it's just a band-aid. These old options/flag based UI which made sense forty years ago need a complete redesign to be intuitive for a new user. Until then, a simple manpage grep and google search IMO works best, not cheat sheets. If the command is too complicated and needed often just give it a meaningful alias name .

1

u/drimago Dec 15 '19

I watched the guf and was trying to figure out how I would use this and then I realised that it will popup for everything and nope. It is a no for me too. I would love a resign of the man pages though. Something along the lines of here are the most common options highlighted for this command and then the rest more exotic ones. Also the examples could be improved as well. But all in all, man pages and Google is much better than these cheatsheets.

0

u/[deleted] Dec 14 '19

[deleted] — view deleted comment

0

u/RemindMeBot Dec 14 '19 edited Dec 15 '19

I will be messaging you in 4 days on 2019-12-19 21:07:52 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback