Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: fix command substitution parsing
- X-seq: zsh-workers 34220
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: fix command substitution parsing
- Date: Sat, 10 Jan 2015 20:25:49 +0000
- In-reply-to: <CAHYJk3SRhx_D3ENXNF4dgWLBAPP7PNhvFFx7cn==tGse2e9CyQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150107164836.035546c4@pwslap01u.europe.root.pri> <CAHYJk3SRhx_D3ENXNF4dgWLBAPP7PNhvFFx7cn==tGse2e9CyQ@mail.gmail.com>
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