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

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



2020-02-08 13:23:46 -0800, Bart Schaefer:
> On Sat, Feb 8, 2020 at 11:37 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> 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.
[...]

The main question here is probably "why is the zle option turned
off in subshells?". AFAICT, zle could only be invoked in
subshells for "vared".

The change (to turn zle off in subshells) is much older (2.5 in
1994).

-- 
Stephane



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