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

PATCH: allow nameref -p



ksh93 allows nameref -p. So p not being listed as an option was probably
an unintended omission, or? It works fine when added.

Was there a good reason not to allow -H/+H with typeset -n?

Combining -m with -n results in an "invalid reference" error even when
converting the relevant parameters would otherwise work. In general,
I think something like typeset -im H\* should have the behaviour of
printing matching parameters that already have the designated type and
not attempt to convert the type of all parameters that match the
pattern.

Oliver

diff --git a/Doc/Zsh/mod_ksh93.yo b/Doc/Zsh/mod_ksh93.yo
index 7508758aa..7d22064ee 100644
--- a/Doc/Zsh/mod_ksh93.yo
+++ b/Doc/Zsh/mod_ksh93.yo
@@ -12,7 +12,7 @@ The single builtin provided by this module is:
 startitem()
 findex(nameref)
 cindex(named references, creating)
-item(tt(nameref) [ tt(-gur) ] var(pname)[tt(=)var(rname)])(
+item(tt(nameref) [ tt(-gpur) ] var(pname)[tt(=)var(rname)])(
 Equivalent to tt(typeset -n )var(pname)tt(=)var(rname)
 
 However, tt(nameref) is a builtin command rather than a reserved word,
diff --git a/Src/Modules/ksh93.c b/Src/Modules/ksh93.c
index 3206c11f3..fa0785cda 100644
--- a/Src/Modules/ksh93.c
+++ b/Src/Modules/ksh93.c
@@ -38,7 +38,7 @@
  */
 
 static struct builtin bintab[] = {
-    BUILTIN("nameref", BINF_ASSIGN, (HandlerFunc)bin_typeset, 0, -1, 0, "gur", "n")
+    BUILTIN("nameref", BINF_ASSIGN, (HandlerFunc)bin_typeset, 0, -1, 0, "gpru", "n")
 };
 
 #include "zsh.mdh"




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