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 d307c652 for ; Sat, 8 Feb 2020 19:37:45 +0000 (UTC) Received: (qmail 26671 invoked by alias); 8 Feb 2020 19:37:35 -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: 45400 Received: (qmail 13429 invoked by uid 1010); 8 Feb 2020 19:37:35 -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.857867 secs); 08 Feb 2020 19:37:35 -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 19:36:53 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: why can't we use "vared" in a subshell in interactive shells? Message-ID: <20200208193653.76grgvjdwkgfzbqs@chazelas.org> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 Hi, from https://unix.stackexchange.com/questions/565718/zsh-timeout-for-vared-builtin/566442?noredirect=1#comment1053418_566442 In a script, both vared myvar and (vared myvar) work, but in an interactive shell, the latter doesn't: $ (vared -c var) vared: ZLE not enabled Why? The code indeed has: if ((interact && unset(USEZLE)) || !strcmp(term, "emacs")) { zwarnnam(name, "ZLE not enabled"); return 1; } And entersubsh() has opts[USEZLE] = 0; zleactive = 0; -- Stephane