Re: [PATCH] Don't export hidden parameters

Philippe Altherr <[email protected]> Thu, 23 Jul 2026 00:45:56 +0200
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAGdYchuTZV5AWRq3ma7XbUzEgkc5kF6m5dONsx93H-Um=aWnXQ@mail.gmail.com>
--000000000000b7db8106573ae7f7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 20, 2026 at 3:45=E2=80=AFAM Bart Schaefer <schaefer@brasslanter=
n.com>
wrote:

> On Sun, Jul 19, 2026 at 6:08=E2=80=AFAM Philippe Altherr
> <[email protected]> wrote:
> >
> > Whenever an -x flagged parameter is updated, the precomputed environmen=
t
> must be updated. However, if the updated -x flagged parameter is hidden b=
y
> a same name local parameter, then the -x flagged parameter is not suppose=
d
> to show up in the environment and therefore no environment update should =
be
> performed.
>
> I don't have time to construct a test case today, but what's the
> effect of this change when:
> -- the exported parameter is a special, and
> -- the local parameter is preserving the special-ness
>    (that is, not declared local -h or was local +h)
>
> Thinking in particular of PATH, MANPATH, FPATH, and WATCH
>

I will have to look into that in light of your explanations in workers/5501=
6
<https://zsh.org/workers/55016>.

Philippe

--000000000000b7db8106573ae7f7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><span style=3D"background-color:transpare=
nt">On Mon, Jul 20, 2026 at 3:45=E2=80=AFAM Bart Schaefer &lt;<a href=3D"ma=
ilto:[email protected]">[email protected]</a>&gt; wrote:</s=
pan></div><div class=3D"gmail_quote gmail_quote_container"><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">On Sun, Jul 19, 2026 at 6:08=E2=80=AFAM P=
hilippe Altherr<br>
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">philipp=
[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; Whenever an -x flagged parameter is updated, the precomputed environme=
nt must be updated. However, if the updated -x flagged parameter is hidden =
by a same name local parameter, then the -x flagged parameter is not suppos=
ed to show up in the environment and therefore no environment update should=
 be performed.<br>
<br>
I don&#39;t have time to construct a test case today, but what&#39;s the<br=
>
effect of this change when:<br>
-- the exported parameter is a special, and<br>
-- the local parameter is preserving the special-ness<br>
=C2=A0 =C2=A0(that is, not declared local -h or was local +h)<br>
<br>
Thinking in particular of PATH, MANPATH, FPATH, and WATCH<br></blockquote><=
div><br></div><div>I will have to look into that in light of your explanati=
ons in=C2=A0<a href=3D"https://zsh.org/workers/55016">workers/55016</a>.</d=
iv><div><br></div><div>Philippe</div><div><br></div></div></div>

--000000000000b7db8106573ae7f7--