zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: "Lawrence Velázquez" <larryv@zsh.org>
Cc: Michael Smith <michael.smith@cloudera.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Bug: 'export FOO' not idempotent
Date: Mon, 27 Jun 2022 23:58:06 +0200	[thread overview]
Message-ID: <CAN=4vMpeOYsyiUs+JYcpeYSogADHD5Wf6UN+1ZDRC140kK7PzQ@mail.gmail.com> (raw)
In-Reply-To: <8d72c021-e5db-469d-b5ec-886248c26e46@www.fastmail.com>

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. 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.


  reply	other threads:[~2022-06-27 21:58 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 [this message]
2022-06-27 22:37         ` Lawrence Velázquez
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='CAN=4vMpeOYsyiUs+JYcpeYSogADHD5Wf6UN+1ZDRC140kK7PzQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=larryv@zsh.org \
    --cc=michael.smith@cloudera.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).