Skip site navigation (1) Skip section navigation (2)

Re: Small bug fix in readline promt handling

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martin Pitt <martin(at)piware(dot)de>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Small bug fix in readline promt handling
Date: 2005-12-29 02:07:53
Message-ID: 200512290207.jBT27rx00177@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Martin Pitt wrote:
-- Start of PGP signed section.
> 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(at)schrab(dot)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?

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Carlos del CachoDate: 2005-12-29 14:26:51
Subject: BUG #2135: system error 182 while loading ODBC driver
Previous:From: David WheelerDate: 2005-12-28 17:02:04
Subject: Re: BUG #2122: Inconsistent FK Error Messages

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group