From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: zsh heredoc crash
Date: Sun, 11 Sep 2016 19:02:55 +0100 [thread overview]
Message-ID: <20160911190255.541e973d@ntlworld.com> (raw)
In-Reply-To: <160909180250.ZM19582@torch.brasslantern.com>
On Fri, 9 Sep 2016 18:02:50 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> I get:
>
> torch% cat >> /tmp/try <<EOF
> heredoc> export A="$(tr '\n' ' ' <<BLDARC
> heredoc> content
> heredoc> BLDARC)"
> heredoc> EOF
> zsh: parse error
This is a feature:
<<[-] word
The shell input is read up to a line that is the same as word,
^^^^
A "line" that matches a "word" means what it says:
% cat <<"HERE)"
heredoc> First line
heredoc> Second line
heredoc> HERE)
First line
Second line
Everything seeems to be working as documented. ("HERE)" without the
quotes would not be "a word" in the shell sense.)
However, of course, if you think you can make things better without
breaking anything, feel free (I'm certainly not looking for things
to change here).
pws
next prev parent reply other threads:[~2016-09-11 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHAq8pEm1FHNvoUJUq2t86P-QKtMdT3uScDUGn-dCscJUGvWew@mail.gmail.com>
[not found] ` <25855010.qczLe9GZ8n@kdudka-nb>
[not found] ` <20160909173515.4cb8392e@pwslap01u.europe.root.pri>
2016-09-10 1:02 ` Bart Schaefer
2016-09-11 18:02 ` Peter Stephenson [this message]
2016-09-12 1:13 ` Bart Schaefer
2016-09-12 23:25 ` Daniel Shahaf
2016-09-13 8:29 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160911190255.541e973d@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).