usql icon indicating copy to clipboard operation
usql copied to clipboard

Consider using readline library from github.com/chzyer/readline

Open ottok opened this issue 7 months ago • 3 comments

Currently usql uses the Readline library from https://github.com/gohxs/readline, which is a fork of https://github.com/chzyer/readline.

However, gohxs/readline hasn't had any commits for 8 years. Seems to me the original library chzyer/readline would be a better choice these days, as it continues to be actively maintained? If it is missing something, perhaps take the code from gohxs/readline you rely on and send as Pull Request to chzyer/readline?

ottok avatar May 17 '25 01:05 ottok

Any views on this @kenshaw? Can usql switch to using git head of https://github.com/gohxs/readline (github.com/gohxs/readline v0.0.0-20171011095936-a780388e6e7c)?

ottok avatar Jul 17 '25 14:07 ottok

Related syntax highlight question: https://github.com/chzyer/readline/issues/253

ottok avatar Jul 26 '25 00:07 ottok

In https://github.com/xo/usql/pull/535#issuecomment-3120838982 Ken replied:

I just tested this, it doesn't work with syntax highlighting, which basically makes this a no-go, as I personally made this project for 2 reasons: 1) to have a tool to use for all SQL databases with the xo/dbtpl project, and 2) syntax highlighting, as psql (and every other native SQL CLI I've used), doesn't support syntax highlighting.

ottok avatar Aug 15 '25 23:08 ottok