Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline... - Mailing list pgsql-general

From Kirk Wolak
Subject Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date
Msg-id CACLU5mSQqd7OAErTcD6wAhwwLLE7On54oeo_isQPA0SEWcYJuQ@mail.gmail.com
Whole thread Raw
In response to Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Dominique Devienne <ddevienne@gmail.com>)
List pgsql-general
On Mon, Nov 21, 2022 at 1:10 PM Dominique Devienne <ddevienne@gmail.com> wrote:
On Mon, Nov 21, 2022 at 6:12 PM Kirk Wolak <wolakk@gmail.com> wrote:
> On Mon, Nov 21, 2022 at 11:01 AM Dominique Devienne <ddevienne@gmail.com> wrote:
> > FWIW, I've been using https://github.com/arangodb/linenoise-ng for Linux and Windows,
>
> I've look at linenoise and without tab/autocomplete it's not worth the effort, IMO.

Not sure to understand... Linenoise* has completion hooks.
Completion is something done in the app, not readline/linenoise.
Only the app has the context to know what to complete the text with.
But perhaps I'm missing something? --DD

https://github.com/arangodb/linenoise-ng/blob/master/include/linenoise.h 

I missed that.  There is a hook for it.  Thank you.  Apologies.

I just got the first pass of readline working in windows with psql!!
it's "rough"  right now, I will have to work through a bunch of assumptions...
but it's WORKING! (at least in utf8)... Tons of testing, and some of this code has not
been compiled for Windows in 17yrs.  I might need to find one of the geniuses who
understands the inner workings of psqlscanslash...

To avoid pasting a screenshot, here is a link to the auto-complete prompt:

pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Next
From: Kirk Wolak
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...