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

Re: PATCH: fix command substitution parsing



On Sat, 10 Jan 2015 20:56:58 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> % alias foo=bar
> % f() $(foo)
> % which f
> f () {
>     $(foobar)
> }

diff --git a/Src/input.c b/Src/input.c
index 04dda5a..2ecac7b 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -537,6 +537,12 @@ inpush(char *str, int flags, Alias inalias)
 static void
 inpoptop(void)
 {
+    if (!lexstop) {
+	inbufflags &= ~INP_ALCONT;
+	while (inbufptr > inbuf)
+	    inungetc(inbufptr[-1]);
+    }
+
     if (inbuf && (inbufflags & INP_FREE))
 	free(inbuf);
 



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