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

Re: More rabbit-holes with unset variables



On Thu, Nov 26, 2020 at 3:53 PM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> > There's no way to "see" the export namespace without forking an
> > external process, so only the internal value matters.
>
> No. The exported value exists whether you decide to look at it or not.

The point is that the exported value DOES NOT exist in this example;
if you were to look at the C global "environ" array following "export
FOO", it would not have (a pointer to a string containing) "FOO" in
it.

> > >   typeset -x FOO
> > >
> > > Is different than this:
> > >
> > >   typeset -x FOO=""
>
> If this is not inconsistent, then nothing is.

Now I'm confused.  All along you've been arguing that { typeset FOO }
SHOULD differ from { typeset FOO="" }.  Why does adding -x invert your
argument?




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