Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1invAi-00062P-TI for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Jan 2020 01:57:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1invAh-0007B4-J4 for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Jan 2020 01:57:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1invAh-0007Ax-9w for pgsql-hackers@lists.postgresql.org; Sun, 05 Jan 2020 01:57:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1invAf-0003C5-AY for pgsql-hackers@postgresql.org; Sun, 05 Jan 2020 01:57:38 +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 0051vSNs000913; Sat, 4 Jan 2020 20:57:29 -0500 From: Tom Lane To: Peter Geoghegan cc: Robert Haas , Christoph Berg , PostgreSQL Hackers Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic. In-reply-to: References: <20200103170226.GB32629@msg.df7cb.de> <26339.1578072930@sss.pgh.pa.us> <20200103174839.GD32629@msg.df7cb.de> <22669.1578104202@sss.pgh.pa.us> <25298.1578106280@sss.pgh.pa.us> <3055.1578115809@sss.pgh.pa.us> <8038.1578119995@sss.pgh.pa.us> <9256.1578121229@sss.pgh.pa.us> <25739.1578161968@sss.pgh.pa.us> <22817.1578167447@sss.pgh.pa.us> <25068.1578181174@s! ss.pgh.pa.us> <26857.1578183240@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Sat, 04 Jan 2020 16:42:56 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <911.1578189448.1@sss.pgh.pa.us> Date: Sat, 04 Jan 2020 20:57:28 -0500 Message-ID: <912.1578189448@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > I've found the actual problem -- it's my ~/.inputrc. Which is read in by > libreadline at some point (determined this using ltrace). Ah-hah! So what we really want here, I guess, is for the test script to suppress reading of ~/.inputrc, on the same principle that it suppresses reading of ~/.psqlrc. A quick look at the readline docs suggests that the best way to do that would be to set envar INPUTRC to /dev/null --- could you confirm that that works for you? > 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? Still, it's just an academic point if we can suppress reading the file. regards, tom lane