From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Roman Perepelitsa" <roman.perepelitsa@gmail.com>
Cc: "Michael Smith" <michael.smith@cloudera.com>, zsh-workers@zsh.org
Subject: Re: Bug: 'export FOO' not idempotent
Date: Mon, 27 Jun 2022 18:37:41 -0400 [thread overview]
Message-ID: <5f14e266-e12c-474b-9366-48ed035de392@www.fastmail.com> (raw)
In-Reply-To: <CAN=4vMpeOYsyiUs+JYcpeYSogADHD5Wf6UN+1ZDRC140kK7PzQ@mail.gmail.com>
On Mon, Jun 27, 2022, at 5:58 PM, Roman Perepelitsa wrote:
> On Mon, Jun 27, 2022 at 11:52 PM Lawrence Velázquez <larryv@zsh.org> 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.
Yes, of course; you participated as well. That explanation was for
Michael.
> 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.
I agree that that would make more sense. The current behavior is
rather odd.
--
vq
next prev parent reply other threads:[~2022-06-27 22:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 21:11 Michael Smith
2022-06-27 21:43 ` Lawrence Velázquez
2022-06-27 21:46 ` Michael Smith
2022-06-27 21:52 ` Lawrence Velázquez
2022-06-27 21:58 ` Roman Perepelitsa
2022-06-27 22:37 ` Lawrence Velázquez [this message]
2022-07-02 22:05 ` Bart Schaefer
2022-07-02 22:14 ` Bart Schaefer
2022-06-27 21:50 ` Roman Perepelitsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f14e266-e12c-474b-9366-48ed035de392@www.fastmail.com \
--to=larryv@zsh.org \
--cc=michael.smith@cloudera.com \
--cc=roman.perepelitsa@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).