zsh-workers
 help / color / mirror / code / Atom feed
* why can't we use "vared" in a subshell in interactive shells?
@ 2020-02-08 19:36 Stephane Chazelas
  2020-02-08 21:23 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Stephane Chazelas @ 2020-02-08 19:36 UTC (permalink / raw)
  To: Zsh hackers list

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-09  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 19:36 why can't we use "vared" in a subshell in interactive shells? Stephane Chazelas
2020-02-08 21:23 ` Bart Schaefer
2020-02-08 22:41   ` Stephane Chazelas
2020-02-09  8:01   ` Stephane Chazelas

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).