Re: pgsql: Add basic TAP tests for psql's tab-completion logic. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date
Msg-id 1736.1578190520@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add basic TAP tests for psql's tab-completion logic.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Peter Geoghegan <pg@bowt.ie> writes:
>> Once I comment out the following two lines from ~/.inputrc, everything
>> works fine on
>> HEAD + HEAD-unset-TERM-in-tab-completion-test.patch:
>> set colored-completion-prefix on
>> set colored-stats on

> Hm.  I wonder how it is that that leads to ignoring the TERM environment?

A bit of digging says that readline's color support is just hard-wired
to use xterm-style escapes -- it doesn't look like there's any connection
to terminfo at all.  See the  _rl_color_indicator[] data structure.
The \e[...m and \e[K escape sequences can both be found there.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Next
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.