noahgorstein / jqp

A TUI playground to experiment with jq
MIT License
2.19k stars 40 forks source link

Feature Request: Tiny cheatsheet with examples built-in #14

Open emilebosch opened 2 years ago

emilebosch commented 2 years ago

Since you're so great implementing my requested features I've got another one for you hahaha 😛 Would be cool to have a tiny cheatsheet built-in with common operations, when you press a hotkey for help.

You could maybe implement this by just rendering a markdown file with all the options, not sure if there is something fancy like that in this go lib. But I think it would be a quick win.

noahgorstein commented 2 years ago

haha, I have done something like before for another project that I think could also work here. See https://github.com/noahgorstein/guard-dog#controls . There's a help menu that you can toggle open/close with ?. Do you think that'd suffice here?

emilebosch commented 2 years ago

Yeah that will suffice I think. Think the ? character would be good, just not sure how it would react if your query also contains a ? you don't want to trigger a help dialog there I think then? Not sure if queries with ? are a common use case.CTRL+H from help could also be an option maybe?

noahgorstein commented 2 years ago

Yeah definitely doesn't need to be ?. We can pick something that won't get in the way of writing a query.