Live data from Hacker News

An interactive cheatsheet tool for the command-line

github.com

41–49 of 49 posts

Re: An interactive cheatsheet tool for the command-line

#41

Wow, this is really cool. I assumed this was going to be written in go or rust, but taking a look it's actually all bash! I'm always surprised by how much people can get out of bash. It's also some of the cleanest bash I've seen. Definitely going to be using some of these patterns for my own scripts.

Thanks! Actually it's written in bash because it started as a 25-line script. If it gets bigger, I'll consider rust.

Re: An interactive cheatsheet tool for the command-line

#43

Would be neat if `navi git` started it up and applied a filter at the same time.

Cool! Will do it!

My only concern is that this way it would be impossible to add subcommands to navi

Let's say that in the future I want to add a command for removing a cheat (navi remove)

The way you described, it would look for snippets which contain "remove"

Any ideas?

Re: An interactive cheatsheet tool for the command-line

#44

Is there a key command or way to find out what's below the cheat? For instance, I tried the "local ip address" example in the demo and it gave the IP address but now 'how' -- ifconfig? was it in a text file? env var? script?

Based on your input, the latest version has a preview window: https://user-images.githubusercontent.com/3226564/65380182-6....

Alternatively, you can use the --print option

I hope you like it!

Re: An interactive cheatsheet tool for the command-line

#47
post #40

Looks neat. I wish, though, there was a way to try it out in the browser as advertised without having to sign up or login. Might be a requirement of the site hosting the demo but whoever it is, forcing login is always and forever a deal breaker for me.

I didn't know it requires a login. Do you know any online free platform that can launch a given docker image?

Sorry but I do not.

Re: An interactive cheatsheet tool for the command-line

#48
post #38

Looks really nice; I don't like the fact that an unknown command is executed before i can see/inspect what it is. Currently you won't even see what command was executed afterwards, you only see the result... Would be nice to be able to also show the command below the item/result. --print is possible, but it's cumbersome and not interactive: you can't "accept" the command after inspecting, and execute it.

Based on your input, the latest version has a preview window: https://user-images.githubusercontent.com/3226564/65380182-6... I hope you like it!

That was fast, great!

Re: An interactive cheatsheet tool for the command-line

#49
post #39
post #11

This looks cool, a common workflow of mine is `cmd --blah --blah ` ah damn I don't know the value for blah, okay, fzf ` --blah=(blahgen | fzf) ` oh I'm also missing [...] This seems like it can help do the same thing more quickly, so I'm keen to give it a go. I do like shell history though, a shame to just have a bunch of `navi` entries - I wonder if it could be faked; populated with the chosen command afterwards?

I could write a zsh/bash plug-in so that it fills the prompt instead of running the command, in the same manner as ctrl-r. What do you think?

That would make the difference between me using this tool and not using this tool. Losing my shell history isn't worth a momentary ergonomics gain.
Post reply on HN