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 1inqM0-0007C3-NE for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jan 2020 20:49:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1inqLy-0005El-Sy for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jan 2020 20:48:58 +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 1inqLy-0005Ee-Jr for pgsql-hackers@lists.postgresql.org; Sat, 04 Jan 2020 20:48:58 +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 1inqLw-0000sP-0y for pgsql-hackers@postgresql.org; Sat, 04 Jan 2020 20:48:58 +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 004KmjMq031441; Sat, 4 Jan 2020 15:48:45 -0500 From: Tom Lane To: Andrew Dunstan cc: Peter Geoghegan , 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> <23181.1578167938@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Sun, 05 Jan 2020 07:01:40 +1030" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31439.1578170925.1@sss.pgh.pa.us> Date: Sat, 04 Jan 2020 15:48:45 -0500 Message-ID: <31440.1578170925@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: > On Sun, Jan 5, 2020 at 6:29 AM Tom Lane wrote: >> What has to have broken those machines was the change to explicitly >> force TERM to "xterm". Now I'm wondering what their prevailing >> setting was before that. Maybe it was undef, or some absolutely >> vanilla thing that prevents libtinfo from thinking it can use any >> escape sequences at all. I'm going to go find out, because if we >> can use that behavior globally, it'd be a heck of a lot safer >> solution than the path of dealing with escape sequences explicitly. > You can see what settings it started with, although only certain > values are whitelisted. See orig_env in the config. e.g. crake, which > is now failing, has no TERM setting. Ah, right. The one-off patch I just pushed also confirms that the TAP tests are seeing TERM-not-set on Andres' machines. I'm currently investigating the possibility of just unsetting it in the tab-completion test and then being able to revert all the escape-sequence hocus-pocus. It's looking promising in local testing, although Peter said off-list that it didn't seem to work in his setup. regards, tom lane