Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: set temporary environment variables for builtins
On Sat, Dec 16, 2023, at 12:59 PM, Clinton Bunch wrote:
> I also tried:
>
> () { typeset -x TZ=Europe/Paris; print -P '%D{%Y%m%dT%H%M%S%z}' }
>
> It left me with TZ set.
With GLOBAL_EXPORT enabled (which is the default), ''typeset -x''
acts like ''typeset -gx''. Use ''local -x''.
% typeset -p TZ
typeset: no such variable: TZ
% () { local -x TZ=Europe/Paris; print -P '%D{%z}' }
+0100
% typeset -p TZ
typeset: no such variable: TZ
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author