Re: psql: fix variable existence tab completion

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: psql: fix variable existence tab completion
Дата
Msg-id CAPpHfdvQUJXYN7rx04XvaFXMwZcvYABK0o2n59=obJO=V8Mi5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: fix variable existence tab completion  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: psql: fix variable existence tab completion  ("Anton A. Melnikov" <a.melnikov@postgrespro.ru>)
Список pgsql-hackers
On Sun, Mar 3, 2024 at 5:37 PM Erik Wienhold <ewie@ewie.name> wrote:
> On 2024-03-03 03:00 +0100, Steve Chavez wrote:
> > psql has the :{?name} syntax for testing a psql variable existence.
> >
> > But currently doing \echo :{?VERB<Tab> doesn't trigger tab completion.
> >
> > This patch fixes it. I've also included a TAP test.
>
> Thanks.  The code looks good, all tests pass, and the tab completion
> works as expected when testing manually.

A nice improvement.  I've checked why we have at all the '{' at
WORD_BREAKS and if we're going to break anything by removing that.  It
seems that '{' here from the very beginning and it comes from the
default value of rl_basic_word_break_characters [1].  It seems that
:{?name} is the only usage of '{' sign in psql.  So, removing it from
WORD_BREAKS shouldn't break anything.

I'm going to push this patch if no objections.

Links.
1. https://tiswww.case.edu/php/chet/readline/readline.html#index-rl_005fbasic_005fword_005fbreak_005fcharacters

------
Regards,
Alexander Korotkov



В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
Следующее
От: Amul Sul
Дата:
Сообщение: Re: Add system identifier to backup manifest