AmrDeveloper / GQL

Git Query language is a SQL like language to perform queries on .git files with supports of most of SQL features such as grouping, ordering and aggregations functions
https://amrdeveloper.github.io/GQL/
MIT License
3.14k stars 89 forks source link

Readline shortcuts #50

Open danobi opened 7 months ago

danobi commented 7 months ago

Sweet tool! I was playing around a bit and I was really missing the standard readline shortcuts.

Is your feature request related to a problem? Please describe.

I don't really know sql that well so I was messing around with some queries. But it got annoying to need to copy paste and then left arrow / right arrow to edit the statements. I was wishing it was possible to up-arrow to get previous history.

Describe the solution you'd like

Would be nice if GQL could support standard readline shortcuts. If it were up to me (big caveat), I would use rustyline: https://github.com/kkawakam/rustyline. I've used it in the past for https://github.com/danobi/btrd and it worked quite well.

I wouldn't mind sending a PR for this if you think it's ok.

Describe alternatives you've considered Could do custom readline implementation in the cli crate.

Additional context N/A

AmrDeveloper commented 7 months ago

Hello @danobi,

Line Editor is very important feature to add, i think rustyline is great but i am experimenting with new custom line editor implementation now with more features like Auto pair complete, better syntax highlighter ...etc, once the core is done i will mention you here and we can compare and check which option is better and add it.

Thank you, Amr Hesham