zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: why can't we use "vared" in a subshell in interactive shells?
Date: Sat, 8 Feb 2020 19:36:53 +0000	[thread overview]
Message-ID: <20200208193653.76grgvjdwkgfzbqs@chazelas.org> (raw)

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

             reply	other threads:[~2020-02-08 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08 19:36 Stephane Chazelas [this message]
2020-02-08 21:23 ` Bart Schaefer
2020-02-08 22:41   ` Stephane Chazelas
2020-02-09  8:01   ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200208193653.76grgvjdwkgfzbqs@chazelas.org \
    --to=stephane@chazelas.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).