pgsql: Avoid reading ~/.inputrc in tab-completion test, and revert othe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid reading ~/.inputrc in tab-completion test, and revert othe
Date: 2020-01-05 02:33:41
Message-ID: E1invjZ-0005Fx-5e@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid reading ~/.inputrc in tab-completion test, and revert other changes.

The true explanation for Peter Geoghegan's trouble report turns out
to be that he has a ~/.inputrc that affects readline's behavior
enough to break this test. Prevent readline from reading that file.

Also, the best way to prevent TERM from affecting the results seems
to be to unset it altogether, not to set it to "xterm". The latter
choice licenses readline to emit xterm escape sequences, and there's
a lot of variation in exactly what it will emit.

Revert changes that attempted to account exactly for xterm escape
sequences. We shouldn't need that with TERM unset, and it was not
looking like a maintainable solution anyway.

Discussion: https://postgr.es/m/23181.1578167938@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/48e03583cd373ce67827f4d8a99dcef8242364b0

Modified Files
--------------
src/bin/psql/t/010_tab_completion.pl | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2020-01-05 04:28:52 Re: pgsql: Add reusable routine for making arrays unique.
Previous Message Peter Geoghegan 2020-01-05 02:18:51 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.