Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A solution to fix hidden references in reference chains
- X-seq: zsh-workers 54265
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: A solution to fix hidden references in reference chains
- Date: Tue, 31 Mar 2026 14:43:59 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EwH5NSWAz54aemoKy+Gv0UT5hZIpvM4ujWnZ6mDh4Tg=; fh=BgAYDYpL6Ne/A5nWEMVJiHiBtrz8Imz3uf26RDwgQX4=; b=PORZy/Gx2DR19EDejm6OIvs+AlrUfSgKbuP95xJ3XbyIxQZiZJPTEPLwt6SDGF4duP hMmJW0+fSac2ySHmnbHvPw7xGZFy/fbYyHHBnE0x78yCb88I7vox0tHch8p6WIzmt3o/ lTJrqZ1jjMw1VZfsZFdwgoTVAykAZb0ykS80NrQx84hqNxfNUU+1VmIGkrddCtOCZLko 646WfGFlMdg7aTbuyw6FyLMp07gHMWgnXwJOxcYG95uLOQrHenQ1p3/1Xs4v1W2tRbcy VSPICLyzSleKBVoPDcfhx35+t/jHJAnG2U/E6ZbAfmJiFM/8+hh2AFot/DI6MjRKe1rF +fUw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1774993450; cv=none; d=google.com; s=arc-20240605; b=ZoAa02WC1rJMTuBhS6RHI33puwdBTSAdkG9IMuFfkaSIYNsAyXmIj4Ni8OXd4edH2Q ZigZ5hLKSUHA20wIX2TPQTjztVT1DxonyZDryywUaiPztuVkdbtwMLqLF8QEEJFmV6JY FUHUY0bDnXRhltrs40vqGxfuHRtnG9jbULd7PFTOWfX4otZTgmWZUidi8B+weST7JwRy /UOdroJgM1rKE81TTenzo9G6i5bHsidyZ+cPIHlWWjYY+kQXmVD7fkJVG/5HNZdfRaaA SJ8CJNp7nfBkWTmNQpuochAqxjENZ9qo+Qu2wmhBymn9ogRUr7knif+GGIABmri1B8ri 02gA==
- Archived-at: <https://zsh.org/workers/54265>
- In-reply-to: <CAGdYchvDR819F-77896HiL_Vb0PGDkJx-KW=CJcEEkYbSvJsAQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYchu3rxH9MBanWDLTuWcaUNh+g1suQD1bRmC+Pbcj+QJY1A@mail.gmail.com> <CAGdYchvU3=Zzk8q-V36EEf9WDHd6Y9Mjgg=mkKFVRn0BbGuAcA@mail.gmail.com> <CAGdYchuNP=3pfWYRX7iq3wqTf1tzwuUA+txdpPiKrLAcATMLdg@mail.gmail.com> <CAGdYchsVb+dSmS6uHVqORNkFdcmY3f9qKz_J9CrLJYuMN6sf0A@mail.gmail.com> <CAH+w=7Y7WcHh6VYUakX42cUc2ybHNPp=q5ex91UUL1HGc1YjMw@mail.gmail.com> <CAH+w=7aWyqQ3WFD_QgPThZ1TgsccZj1DfJ9Pf7FS5Pqkc3wD9g@mail.gmail.com> <CAGdYchv8AsaH4UQHcqvetAOmiYrS3_0uNKf+yn2kXRP3YLbWzw@mail.gmail.com> <CAH+w=7Y9YO4n5QXOsDnkjVzz5KEr1Hh7AhinzO+kxjvdKwL+HA@mail.gmail.com> <CAGdYchsioZqVwsr47KqR--2zPBXM_hvg6QrPdkDYw52-R=qbgw@mail.gmail.com> <CAH+w=7YNnhkG+_=O3UTfYnfgqmG6jM_WLi9X9jixrSg7jYwgiw@mail.gmail.com> <CAGdYchtH=fxh0Gg+s-UzzK3HWyuTtoPOCfXYJjXdVX1xAUT9mg@mail.gmail.com> <CAGdYchvDR819F-77896HiL_Vb0PGDkJx-KW=CJcEEkYbSvJsAQ@mail.gmail.com>
On Fri, Mar 27, 2026 at 5:50 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Here is an updated version, now built on top of workers/54261, and where I have added tests for the various corner cases.
A remark in passing ...
> +#define PM_UNSET (1<<24) /* If PM_DECLARED is also present, parameter
> + * has null value. Otherwise, parameter was
> + * unset.
> + */
> #define PM_DEFAULTED (PM_DECLARED|PM_UNSET)
It's inaccurate to say the parameter has a null value. There's no
such thing as a null value in shell. That's why the following #define
calls it PM_DEFAULTED. It means the parameter exists in a scope
(which, at least previous to this patch, also implied it has a known
type) but does not have a value (which is distinct from languages
where null/undef IS a value). This goes back to the discussion in
which PM_NULL was rejected, which as I previously said I don't want to
rehash.
I'm of two minds whether to try to fix the comment or just remove it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author