Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

why can't we use "vared" in a subshell in interactive shells?



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



Messages sorted by: Reverse Date, Date, Thread, Author