Re: psql: tab completion differs on semicolon placement

2021-09-21 Thread Dagfinn Ilmari Mannsåker
David Fetter writes: > On Mon, Sep 20, 2021 at 08:26:51PM +0100, Dagfinn Ilmari Mannsåker wrote: > >> The same applies to any completion after a MatchAny that ends in a any >> of the WORD_BREAKS characters (except whitespace and () which are >> handled specially). >> >> #define WORD_BREAKS

Re: psql: tab completion differs on semicolon placement

2021-09-20 Thread David Fetter
On Mon, Sep 20, 2021 at 08:26:51PM +0100, Dagfinn Ilmari Mannsåker wrote: > Daniel Gustafsson writes: > > > While testing a patch I fat-fingered a CREATE DATABASE statement by tab > > completing *after* the semicolon, with no space between the objname and > > semicolon. The below options were

Re: psql: tab completion differs on semicolon placement

2021-09-20 Thread Daniel Gustafsson
> On 20 Sep 2021, at 21:26, Dagfinn Ilmari Mannsåker wrote: > IMO a fix should be more principled than just special-casing semicolon > and CREATE TABLE. Maybe get_previous_words() should stop when it sees > an unquoted semicolon? Agreed, something along those lines makes sense. I will

Re: psql: tab completion differs on semicolon placement

2021-09-20 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: > While testing a patch I fat-fingered a CREATE DATABASE statement by tab > completing *after* the semicolon, with no space between the objname and > semicolon. The below options were presented, which at this point aren't > really > applicable: > > db=# create

psql: tab completion differs on semicolon placement

2021-09-20 Thread Daniel Gustafsson
While testing a patch I fat-fingered a CREATE DATABASE statement by tab completing *after* the semicolon, with no space between the objname and semicolon. The below options were presented, which at this point aren't really applicable: db=# create database foo; ALLOW_CONNECTIONS ENCODING