Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[bug] variables not exported to environment when declared private in parent scope
- X-seq: zsh-workers 49207
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [bug] variables not exported to environment when declared private in parent scope
- Date: Wed, 28 Jul 2021 06:55:43 +0100
- Archived-at: <https://zsh.org/workers/49207>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
$ zmodload zsh/param/private
$ f() { private a=1; g; }
$ g() { typeset -p a; printenv a || print -u2 not there; }
$ export a=0
$ f
export a=0
not there
See how g does seem to think $a is exported, but still it's not
passed to printenv.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author