GQL icon indicating copy to clipboard operation
GQL copied to clipboard

Readline shortcuts

Open danobi opened this issue 1 year ago • 1 comments

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

danobi avatar Dec 04 '23 16:12 danobi

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

AmrDeveloper avatar Dec 05 '23 05:12 AmrDeveloper