Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Hiding specials, and namerefs
- X-seq: zsh-workers 55031
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Philippe Altherr <philippe.altherr@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Hiding specials, and namerefs
- Date: Fri, 24 Jul 2026 21:14:04 -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-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mdYGv94JXPgZlaGOl5T4p3Xn4qMeS4GOFtM3bFRId/A=; fh=RngAOd9wlRc8Glv1v2GOfDUnq2FsyrczungEY8JNfXY=; b=EfQ/iJtuQumRJXtz37YS2xOT7CZ+fa2VAoDOV0rlai7F5NvL+NW9a690fEvg5gxwFb WP/wVahXyd0zuKkz9rQmbA37t3SOsw4PbNdYGtDFJePCIqC2BPWbohFZ9oekqkS46h5H +KKqlib6Nt9vukjdk4hbYPy0YTxTUCI6vav3zb+i24V1uTHpnVRUBVRjLAvx+gnpVfB1 x/4Q7caSHOY2V88QFhFRFPYsm2osIWyS5yz7Xyh1UwZcn633VYd3zNMQrmMCmVB/mxcN q3M25Jcu14Bvdo25lfo373RLABRcCV7ksH4E/ElnpxgUbZB0bq6kD01PnfdpEN9xqL4v E61Q==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1784952855; cv=none; d=google.com; s=arc-20260327; b=JAMAzhQdeTEYmkfsJksT7admPIEL9xJ9/CkC1GjIZaTbuzp7no57fgaM+3Vid9DQ1k XCVrDJPNqoKjJWwUXi/Cuo5zQFf+8JxouYmllb1E7HKdG9vHbOV1IGzbStrXCJZNYqDP QJwxhEaDUgMI4M2WDEbcf+hA5XnocR74JOBiXgE7nW7mKHNlGxE0F6c16Dsehwqlars4 FhhEukYuOUuK2KQrrKTC2QYdu9d2tyqJqtH7TFNiOmE6A7iSARgHnQAREMnRDPcsKNuL qumWJM7THI6bA3bmhVUmUuloBFZNGKr9KPYHsNq0/FkdVskXp6GwhHwQNVQtcpWrB7rm 6dMA==
- Archived-at: <https://zsh.org/workers/55031>
- In-reply-to: <CAGdYchuSvT8isj+cVMGFT83+O_dH8oN9Bq2tJEhbNSFoX5AMdw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7ZVUPRKBpRVOGX4eSqbKNFyt8PrYC4r37GMGu1KJO8Egg@mail.gmail.com> <CAHYJk3SP_uEk8YTCpExj2fYi7uKyMRYA389zUWVyUGqx+VhJ=Q@mail.gmail.com> <CAH+w=7YqtTKZSkmd3Q=B5UkJJ=iih1NbWJ7Jn=P02fJudo+TWA@mail.gmail.com> <CAH+w=7bVtQunfVqFhJrJPGaY8B+kM9YFnt_NK8h9FFVuMDqkcg@mail.gmail.com> <CAGdYchsA6=BSMEfZJ9=ORrRr+X=FX1wmz1-dQuF9WoKDjYotUA@mail.gmail.com> <CAGdYchuSvT8isj+cVMGFT83+O_dH8oN9Bq2tJEhbNSFoX5AMdw@mail.gmail.com>
On Thu, Jul 23, 2026 at 7:12 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> I was reviewing the code of typeset_single in order to understand how special parameters get localized. I still haven't figured this out but I noticed that this condition is most likely missing a PM_NAMEREF.
else if (usepm || newspecial != NS_NONE) {
int chflags = ((off & pm->node.flags) | (on & ~pm->node.flags)) &
(PM_INTEGER|PM_EFLOAT|PM_FFLOAT|PM_HASHED|
PM_ARRAY|PM_TIED|PM_AUTOLOAD);
/* keep the parameter if just switching between floating types */
Adding PM_NAMEREF there changes only the "remove nameref attribute"
and "add and remove readonly attribute with references" tests in K01
(and not in I think a way we want) and makes no difference to `typeset
-gn SRANDOM`
E.g.:
--- expected
+++ actual
@@ -1 +1 @@
-typeset ptr=var
+typeset ptr
Test K01nameref.ztst failed: output differs from expected as shown above for:
typeset -n ptr=var
typeset +n ptr
typeset -p ptr
Was testing: remove nameref attribute
Messages sorted by:
Reverse Date,
Date,
Thread,
Author