From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: zsh heredoc crash
Date: Fri, 9 Sep 2016 18:02:50 -0700 [thread overview]
Message-ID: <160909180250.ZM19582@torch.brasslantern.com> (raw)
In-Reply-To: <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@redhat.com> 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().
next parent reply other threads:[~2016-09-10 1:03 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 [this message]
2016-09-11 18:02 ` Peter Stephenson
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=160909180250.ZM19582@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).