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

Re: set temporary environment variables for builtins



On Sun, Dec 17, 2023 at 1:27 AM Lawrence Velázquez <larryv@xxxxxxx> wrote:
>
> On Sat, Dec 16, 2023, at 3:27 PM, Bart Schaefer wrote:
> > On Sat, Dec 16, 2023 at 12:22 PM Lawrence Velázquez <larryv@xxxxxxx> wrote:
> >>
> >> It does work, in general.
> >
> > Well, no, it doesn't.  It works for parameters that zsh separately
> > considers to be "special", which includes all the LC_* variants.  TZ
> > is not special.
>
> Huh, this is very surprising to me.  I guess I never noticed because
> almost all the variables that can influence builtins (e.g., CDPATH,
> LC_*, OPTIND, etc.) are special.

I am also surprised by this. It does make sense given the
implementation details but it's not how I expected zsh to behave.

Would it make sense to make all parameters that affect builtins
special? Are there parameters other than TZ that affect builtins but
aren't already special?

Roman.




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