Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: More rabbit-holes with unset variables
- X-seq: zsh-workers 47651
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Subject: Re: More rabbit-holes with unset variables
- Date: Thu, 26 Nov 2020 15:29:34 -0800
- Archived-at: <https://zsh.org/workers/47651>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-11/CAH%2Bw%3D7ZgzpTtjcnQ4mmZVAZzi%3DTE_m1dW0AZQm5oLhMDyG8pZg%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-oi1-f181.google.com) smtp.remote-ip=209.85.167.181; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uQUF9dPfGzw4shhz4MP23pUpgqYfYcMvP4u6GW68h+w=; b=mSud43Eu3QYhKnJEcgIHk+E+7167txQV1YWgxAKUFePUn9iLS2bduSjYqpw7Ya6lQv DtyoeXoTNhD2ilz96DXF9xmPB7uFr5gYWqK91SM5FEORevQo+Wv/3RGwytrERJ+ksmcz Imja8FnflzT1WmfA0Qc9jZ8gsJWa4bpryOHkdl1CzCczfXvhVxo81MgkcVUz60XiY8nf RcVbw4s208L2z24sjR1QFvxJ01S9OT18L6Xur9rxz+JYc4MjqWRRogUZ5VaQNEI4G00P 1DhARATEHZTaa1BzsbB5vPhtgt9HbRMrIB0VvaRoM1HLyzCrwSA++kiscBpSduA+TWH4 g5ow==
- In-reply-to: <CAMP44s3h2q42=y_fbts5mbgb8oYXYVxKrXQUS35k205X1i15OQ@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <CAH+w=7Zag5MG5D=cRS2UMSsqJ0t=iw5MH9j8=HBO1Q77nbs03w@mail.gmail.com> <20201125131921.vay7h3xk5qn4odgg@chazelas.org> <CAMP44s0-ki=TBzTwnqx10FcTLX4mbphwN88UCx0+h97JTecBWA@mail.gmail.com> <20201126061029.in5tpnrg5bplam5k@chazelas.org> <CAMP44s1XgxdDAAL+7nL3_GK=dZUasPmSWZaKqWg0T-v5iq1eYg@mail.gmail.com> <86243-1606389706.499549@-gQx.nNYG.4Z3k> <CAH+w=7bxavq4DMJtTmSAGTOSoXKsFaXPVyUAGqN1cZLF=+57JQ@mail.gmail.com> <CAMP44s3h2q42=y_fbts5mbgb8oYXYVxKrXQUS35k205X1i15OQ@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Thu, Nov 26, 2020 at 1:31 PM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> And you don't find it inconsistent that the internal value is
> *different* from the exported value?
That's a loaded question, because to answer it requires conceding that
there exists an exported value from which the internal value differs.
There's no way to "see" the export namespace without forking an
external process, so only the internal value matters.
That internal value exists for the sole purpose of recording the fact
that two different namespaces need to be synchronized whenever either
of them changes. The "difference" occurs because neither namespace
has changed yet. The fact that there is no first-class "not defined"
value that can be employed for this purpose is the same issue that got
us into this whole discussion to begin with.
We're back to the point that from inside the shell, the only place
where that difference is a distinction is when you explicitly inquire
about the "not defined" state, and I'm already looking for a solution
to that.
> Plus this:
>
> typeset -x FOO
>
> Is different than this:
>
> typeset -x FOO=""
>
> ?
It also differs from
typeset -i FOO
which internally sets FOO=0 but doesn't export it until something
changes. Diving into how zsh represents the relationship between the
internal and exported namespaces is a whole other ball of wax and is
why I tried to keep it out of scope before Oliver brought it up.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author