From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id c06523c3 for ; Sat, 8 Feb 2020 22:42:01 +0000 (UTC) Received: (qmail 9975 invoked by alias); 8 Feb 2020 22:41:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45402 Received: (qmail 25836 invoked by uid 1010); 8 Feb 2020 22:41:53 -0000 X-Qmail-Scanner-Diagnostics: from relay9-d.mail.gandi.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25713. spamassassin: 3.4.2. Clear:RC:0(217.70.183.199):SA:0(-2.6/5.0):. Processed in 1.864834 secs); 08 Feb 2020 22:41:53 -0000 X-Envelope-From: stephane@chazelas.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _nblcust.gandi.net designates 217.70.183.199 as permitted sender) X-Originating-IP: 2.127.75.28 Date: Sat, 8 Feb 2020 22:41:13 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh hackers list Subject: Re: why can't we use "vared" in a subshell in interactive shells? Message-ID: <20200208224113.tlswyr6tk5k3hjrl@chazelas.org> Mail-Followup-To: Bart Schaefer , Zsh hackers list References: <20200208193653.76grgvjdwkgfzbqs@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 2020-02-08 13:23:46 -0800, Bart Schaefer: [...] > Looks like an overlooked side-effect to me. The assumption being made > is that in interactive mode, if USEZLE is false then it's because the > user has explicitly unsetopt'd it, not because it was temporarily > disabled on entry to a subshell. > > There are two ways we could go here: > 1) Assume that if the user has invoked vared, then it's OK to run ZLE > even if it was otherwise turned off, and just remove that test > entirely. (The check for TERM == emacs is mostly obsolete anyway, if > we're attempting to do that we should be looking for [absense of] > certain terminfo values, not a specific terminal type.) > 2) Figure out some way to remember the old state of USEZLE when > entering the subshell, and check that in bin_vared instead of checking > the current state. [...] Thanks. The threads at https://www.zsh.org/mla/workers/2000/msg02518.html and http://www.zsh.org/mla/workers/2000/msg02367.html do bring some context. (for the first one, the threading of messages on the website seems broken, you can see the other messages in the discussion at http://www.zsh.org/mla/workers/2000/date3.html) -- Stephane