noahgorstein / jqp

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

feat: add basic command history #33

Closed nerg4l closed 2 years ago

nerg4l commented 2 years ago

Related to #11

A really basic command history. Features:

More complex behaviour (e.g. history suggestion with tab trigger) could be added by replacing textinput.Model of queryinput.Bubble with a fully custom model.

noahgorstein commented 2 years ago

@nerg4l thanks for your contribution! This works great for me. Just left one question but looks good to go otherwise.

noahgorstein commented 2 years ago

Going to go ahead and merge this @nerg4l. Thanks again for your contribution! I think we'll be able to build on this by maybe showing a view of all history or something like that. And to your original comment in the PR description, I've been interested in using bubbline but just haven't had a chance to explore and implement it yet. From what I understand, there is a completion API and some other really nice features in that. Would take a bit of work to get it wired into jqp, but think it could really make it special. If you're interested in doing that or want to take a different approach, PRs are most certainly welcome :D. Cheers!