Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 1/2] persistent locals - hidden references



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


Messages sorted by: Reverse Date, Date, Thread, Author