Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: 'export FOO' not idempotent
On Mon, Jun 27, 2022 at 11:52 PM Lawrence Velázquez <larryv@xxxxxxx> wrote:
>
> On Mon, Jun 27, 2022, at 5:46 PM, Michael Smith wrote:
> > Thanks for responding! I searched a bit but hadn't made that
> > connection.
>
> Ah, yes -- the discussion was about "typeset", but it also affected
> commands like "export" and "local" which in zsh are basically just
> "typeset" in disguise.
I remember. I was following that discussion. Here the issue is
different. The problem is that `export FOO` doesn't export anything.
Moreover, the subsequent `typeset -p FOO` says that FOO *is* exported.
I think it should work as follows when TYPESET_TO_UNSET is not in
effect (the default):
% typeset -p FOO
typeset: no such variable: FOO
% export FOO
% typeset -p FOO
% export FOO=''
% env | grep FOO
FOO
Currently it works this the same way except for the last command,
which outputs nothing. I think it should output "FOO" like in the
hypothetical listing above.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author