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

Re: [PATCH] Don't perform dereferencing when looking up certain special parameters



I should perhaps have looked more closely at this before committing it.

On Tue, May 5, 2026 at 4:08 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> The code managing a number of special parameters performs dereferencing while looking up the parameter. This often leads to bogus behavior.
> In this case, the wrong parameter is exported. In many cases, the fix is to simply not perform any dereferencing, which is what the following patch does for a number of special parameters.

A side-effect of switching from paramtab->getnode() to
realparamtab->getnode2() is that the call to loadparamnode() is
bypassed.  That came from
workers/53781: fix loading of autoload variable via a reference
I suspect this is OK in the specific circumstances.  Calling it out in case not.




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