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 dbea0a3e for ; Sat, 8 Feb 2020 21:24:49 +0000 (UTC) Received: (qmail 480 invoked by alias); 8 Feb 2020 21:24:42 -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: 45401 Received: (qmail 27699 invoked by uid 1010); 8 Feb 2020 21:24:42 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f41.google.com 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(209.85.167.41):SA:0(-1.9/5.0):. Processed in 1.940026 secs); 08 Feb 2020 21:24:42 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.41 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=nReDYcwgwzXV63PfoWbEsVYs6Bn8FC3fK/SPG1KeS54=; b=iP8I5aMLVCXKoKItMfpiVBPPlWbD2EMBRnuLfpBwYCRQ2RaftQAxnPS05gDxEOrUKK sPO1rAQITKT1cVRAbR0hKMe0HbmYDPkO/3cjKXJ1/0F4TrWkjzXuiVdPLDE1XyAQB0Eh d8iaoepQYjNm/ssO02GaOiwYK1s7B6AMyHuGspk5+LVXcjKXw3svqzmcD8HX/s2ReLwY qLtopIrA/eukgjB+gFA8Gf8kwMuEov2dv0vKsGUjA+RSabjVgTWxrxuYJRwk2EG69prg fVAM3vNifdzJbsbrHOnpzX04Cv9QtBcpOZJMQGnKeYV5frxkxDXLaCtoUr3kpPyNfhfA yaOw== X-Gm-Message-State: APjAAAUAVKne6ZG/hwv29P9v+D87lzGnMphbKbauI7HijgQmgDaMrjV7 l+XcxkUkjrL0gOkux6RQs7jSsQo4GyehDCwQ7ILZ3ypS X-Google-Smtp-Source: APXvYqzldzn1K1/LlBToVwgx1jWf9f8gb0ktfRO8wKSoJJuO4URx4vZhBrnjD3QJknTJRev8vlfsq6VXeBgWGqQZekw= X-Received: by 2002:ac2:4c2b:: with SMTP id u11mr2640096lfq.46.1581197045513; Sat, 08 Feb 2020 13:24:05 -0800 (PST) MIME-Version: 1.0 References: <20200208193653.76grgvjdwkgfzbqs@chazelas.org> In-Reply-To: <20200208193653.76grgvjdwkgfzbqs@chazelas.org> From: Bart Schaefer Date: Sat, 8 Feb 2020 13:23:46 -0800 Message-ID: Subject: Re: why can't we use "vared" in a subshell in interactive shells? To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Sat, Feb 8, 2020 at 11:37 AM Stephane Chazelas wrote: > > $ (vared -c var) > vared: ZLE not enabled > > Why? 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.