zsh-workers
 help / color / mirror / code / Atom feed
* $functions: failed to find end of command substitution
@ 2016-06-02 17:05 Daniel Shahaf
  2016-06-03  8:52 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Shahaf @ 2016-06-02 17:05 UTC (permalink / raw)
  To: zsh-workers

$ zsh -f
% f() {                             
  : $(:)
  "↓"
}
% : $functions
zsh: failed to find end of command substitution
% 

It doesn't happen if I change "↓" (U+2193) to "→" (U+2192).


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: $functions: failed to find end of command substitution
  2016-06-02 17:05 $functions: failed to find end of command substitution Daniel Shahaf
@ 2016-06-03  8:52 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2016-06-03  8:52 UTC (permalink / raw)
  To: zsh-workers

On Thu, 2 Jun 2016 17:05:08 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-03  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 17:05 $functions: failed to find end of command substitution Daniel Shahaf
2016-06-03  8:52 ` Peter Stephenson

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).