Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Dominique Devienne <ddevienne(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date: 2022-11-23 03:50:55
Message-ID: CACLU5mSQqd7OAErTcD6wAhwwLLE7On54oeo_isQPA0SEWcYJuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 21, 2022 at 1:10 PM Dominique Devienne <ddevienne(at)gmail(dot)com>
wrote:

> On Mon, Nov 21, 2022 at 6:12 PM Kirk Wolak <wolakk(at)gmail(dot)com> wrote:
> > On Mon, Nov 21, 2022 at 11:01 AM Dominique Devienne <ddevienne(at)gmail(dot)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:
https://app.screencast.com/RBwKbZeXFdBnO

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wolak 2022-11-23 04:59:59 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Previous Message Thomas Munro 2022-11-22 22:50:58 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...