From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: zsh heredoc crash
Date: Sun, 11 Sep 2016 18:13:28 -0700 [thread overview]
Message-ID: <160911181328.ZM21397@torch.brasslantern.com> (raw)
In-Reply-To: <20160911190255.541e973d@ntlworld.com>
On Sep 11, 7:02pm, Peter Stephenson wrote:
}
} A "line" that matches a "word" means what it says:
OK. Bash almost works the same way:
$ echo "$(cat <<EOF
> something
> EOF)"
bash: warning: here-document at line 5 delimited by end-of-file (wanted `EOF')
bash: warning: here-document at line 5 delimited by end-of-file (wanted `EOF')
bash: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
something
EOF)
$
So it similarly treats "EOF)" as part of the here-document / not a match
for the end delimiter, but it also closes the quoted string rather than
leave the parser hanging expecting more lines of here-document.
Given our current parsing paradigm I can't think of a way to have zsh
look for "end of here-document or end of current quote whichever comes
first" and the zsh behavior is consistent with the command substitution
having not yet closed either, so I guess we're fine.
next prev parent reply other threads:[~2016-09-12 1:13 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
2016-09-12 1:13 ` Bart Schaefer [this message]
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=160911181328.ZM21397@torch.brasslantern.com \
--to=schaefer@brasslantern.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).