Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XA1yE-0007tk-T3 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 19:12:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XA1yE-0006Oy-B5 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 19:12:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA1yD-0006Oq-4l for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 19:12:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA1y5-00007n-MO for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 19:12:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6NJClwM023903; Wed, 23 Jul 2014 15:12:47 -0400 From: Tom Lane 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 In-reply-to: <20140723175629.27768.38545@wrigleys.postgresql.org> References: <20140723175629.27768.38545@wrigleys.postgresql.org> Comments: In-reply-to fleminra@gmail.com message dated "Wed, 23 Jul 2014 17:56:29 -0000" Date: Wed, 23 Jul 2014 15:12:47 -0400 Message-ID: <23902.1406142767@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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