* [PATCH 1/2] persistent locals - hidden references
@ 2023-09-06 5:04 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2023-09-06 5:04 UTC (permalink / raw)
To: Zsh hackers list
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: hideval-nameref.txt --]
[-- Type: text/plain, Size: 838 bytes --]
diff --git a/Src/builtin.c b/Src/builtin.c
index 31af66c7c..01df7d73b 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2697,7 +2697,7 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func)
off |= bit;
}
if (OPT_MINUS(ops,'n')) {
- if ((on|off) & ~PM_READONLY) {
+ if ((on|off) & ~(PM_READONLY|PM_HIDEVAL)) {
zwarnnam(name, "no other attributes allowed with -n");
return 1;
}
diff --git a/Test/K01nameref.ztst b/Test/K01nameref.ztst
index d8c098a98..50224c32d 100644
--- a/Test/K01nameref.ztst
+++ b/Test/K01nameref.ztst
@@ -762,4 +762,9 @@ F:previously this could create an infinite recursion and crash
1:create nameref by pattern match not allowed
*?*typeset:1: invalid reference
+ typeset -nH foo=bar
+ typeset -p foo
+0:nameref with hidden value
+>typeset -n foo
+
%clean
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-06 5:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06 5:04 [PATCH 1/2] persistent locals - hidden references Bart Schaefer
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).