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

Re: $functions: failed to find end of command substitution



On Thu, 2 Jun 2016 17:05:08 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> $ zsh -f
> % f() {                             
>   : $(:)
>   "↓"
> }
> % : $functions
> zsh: failed to find end of command substitution

"Great questions of history finally answered..."

pws

diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index edb0517..98bcaba 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -487,11 +487,6 @@ scanfunctions(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)
 			    strcat(pm.u.str, " \"$@\"");
 			} else
 			    pm.u.str = dyncat(start, t);
-			/*
-			 * TBD: Is this unmetafy correct?  Surely as this
-			 * is a parameter value it stays metafied?
-			 */
-			unmetafy(pm.u.str, NULL);
 			zsfree(t);
 
 			if (shf->redir) {
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index 39ba5ef..dedf241 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -553,3 +553,12 @@
 0:${(q+)...} with printable multibyte characters
 >ホ
 >'She said "ホ".  I said "You can'\''t '\''ホ'\'' me!'
+
+#  This will silently succeed if zsh/parameter isn't available
+  (zmodload zsh/parameter >/dev/null 2>&1
+  f() {
+    : $(:)
+    "↓"
+  }
+  : $functions)
+0:Multibtye handled of functions parameter



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