Small bug fix in readline promt handling

Поиск
Список
Период
Сортировка
От Martin Pitt
Тема Small bug fix in readline promt handling
Дата
Msg-id 20051222182407.GF5076@piware.de
обсуждение исходный текст
Ответы Re: Small bug fix in readline promt handling  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Small bug fix in readline promt handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi!

When using %[ and %] (prompt length ignore area) in .psqlrc's prompt
formats, psql sends a \001 before the actual readline commands
(RL_PROMPT_{START,END}_IGNORE). This is the way bash handles the
shell's PSx format, but it is not a readline command, but a bash
specific quirk.

Example .psqlrc:
\set PROMPT1 '%[%033[0;35m%]%/@%m%R%#%[%033[0;22m%] '

-> not correctly handled, the cursor will be in the middle of the
prompt.

Attached patch fixes this. This was investigated and patched by Aaron
Schrab <aaron@schrab.com>, full details at http://bugs.debian.org/343616

Thank you for considering this, and have a merry christmas!

Martin

--
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Вложения

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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: BUG #2121: Problem with backup and query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: horology regression test failure