From: Tom Lane <tgl@sss.pgh.pa.us>
To: fleminra@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Date: Wed, 23 Jul 2014 15:12:47 -0400
Message-ID: <23902.1406142767@sss.pgh.pa.us> (raw)
In-Reply-To: <20140723175629.27768.38545@wrigleys.postgresql.org>
References: <20140723175629.27768.38545@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, fleminra@gmail.com
Subject: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
In-Reply-To: <23902.1406142767@sss.pgh.pa.us>
References: <20140723175629.27768.38545@wrigleys.postgresql.org> <23902.1406142767@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox