Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars

Поиск
Список
Период
Сортировка
От Robert Fleming
Тема Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Дата
Msg-id CABA-fbh5Gyx2Tm6gBr62Vm21Np5CmF-SwgN-mTbUVMw0O7g+XQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Yes, sorry, actually it's using libedit. Is that supported?

Here is a video of what I'm seeing:
https://app.box.com/s/dj2hzo6tuny2os16t3rd
(This OGV file plays better in VLC than mplayer for me.)


On Wed, Jul 23, 2014 at 12:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> fleminra@gmail.com writes:
> > Basically, the colorized prompt suggested in
> >
> http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
> > :
>
> >   testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%]%# '
>
> > results in strange readline behavior. In that prompt, "%[" should be
> > preceded by "%001" and "%]" should be followed by "%002".
>
> Actually, %[ is supposed to expand to \001 and %] is supposed to expand
> to \002.
>
> The example seems to work as given for me.  Could you be more specific
> about what's going wrong for you?  Also, are you sure you are really
> using GNU readline, and not something else like libedit?
>
>                         regards, tom lane
>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11025: could not access status of transaction 7
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars