Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh heredoc crash
- X-seq: zsh-workers 39262
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh heredoc crash
- Date: Fri, 9 Sep 2016 18:02:50 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=DytgVKMT5rYtuyl5xY1WXJhFSEspGMEitEO+AX+XuP4=; b=Czz5hZvHQX/O8m0Gzax61/OFu38wj1N8nguGPfZ8Wd2vSCzySrIFNh/nICWV2RpOTC 5VCEO/oRJfoxhIcgelsm7Si1jGHQPWESxG9CQB4ARaMPz29TA3K7UJxrLim4m1coB6lL ZqG0Qb1upKM/sd3UKDCxPXgwM+vUxxF7jQilsojwC7vAbYamqBJKmCAeTfklTURsz/sx 8L5IcJqm3uDJALYDpPbsu9ANRRhMpqlLF84urI7I5/7QsO4eFnYUXNeFSmvPLetSjNBP +Iewx1PLq4Ft6HGOggrxT8TVzTQTig7y4Nfg0jlgyK2UcoGRre4oKSd1IjEX/ycc/evZ eMWA==
- In-reply-to: <20160909173515.4cb8392e@pwslap01u.europe.root.pri>
- 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: <CAHAq8pEm1FHNvoUJUq2t86P-QKtMdT3uScDUGn-dCscJUGvWew@mail.gmail.com> <25855010.qczLe9GZ8n@kdudka-nb> <20160909173515.4cb8392e@pwslap01u.europe.root.pri>
[>workers]
On Sep 9, 5:35pm, Peter Stephenson wrote:
} Subject: Re: zsh heredoc crash
}
} On Fri, 9 Sep 2016 16:33:19 +0200
} Kamil Dudka <kdudka@xxxxxxxxxx> wrote:
} > On Friday, September 09, 2016 10:00:54 Paulo Cesar Pereira de Andrade wrote:
} > > ---8<---
} > > #!/usr/bin/zsh
} > >
} > > cat >> /tm/ptry <<EOF
} > > export A="$(tr '\n' ' ' <<BLDARC
} > > content
} > > BLDARC)"
} > > EOF
} > > ---8<---
} >
} > I was not able to make upstream zsh 5.0.2 crash with the above reproducer.
}
} That's the underlying bug Paulo is talking about, yes
} (zsh-workers/34322).
I get:
torch% cat >> /tmp/try <<EOF
heredoc> export A="$(tr '\n' ' ' <<BLDARC
heredoc> content
heredoc> BLDARC)"
heredoc> EOF
zsh: parse error
However, if I add another line break, it works:
torch% cat >> /tmp/try <<EOF
export A="$(tr '\n' ' ' <<BLDARC
content
BLDARC
)"
EOF
torch% cat /tmp/try
export A="content "
torch%
This is because gethere() is looking for a *line* containing only the end
token, even though the top of the call chain is parse_event(OUTPAR). The
desired end token is not passed down through par_sublist().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author