Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: All the way up or current scope
On Mon, May 12, 2025 at 11:42 AM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> At any point in time, if ref=var and ref was defined with -u, then
> - if var refers to a variable in the enclosing scope of the scope where ref was defined, then expanding ref returns the expansion of that variable and assigning to ref assigns to that variable,
> - otherwise, expanding ref returns the empty string and assigning to ref first defines a global variable var and then assigns to it unless a variable var already exists (in the current or an enclosing scope), in which case assigning to ref has no effect.
I don't think the second part of that can work exactly as stated. I
don't really follow the conditions in which assigning would have no
effect.
In any case after workers/53602 the behavior should be very close to that.
It's getting late at night here so I'm going to call it a day and
think through your "Indeed" message sometime tomorrow.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author