Date: Sun, 30 May 2010 14:11:27 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/bin/sh parser.c src/tools/regression/bin/sh/parser heredoc4.0 heredoc5.0 Message-ID: <201005301416.o4UEGrOm055374@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jilles 2010-05-30 14:11:27 UTC
FreeBSD src repository
Modified files:
bin/sh parser.c
Added files:
tools/regression/bin/sh/parser heredoc4.0 heredoc5.0
Log:
SVN rev 208655 on 2010-05-30 14:11:27Z by jilles
sh: Change interaction of command substitution and here documents.
If a command substitution contains a newline token, this no longer starts
here documents of outer commands. This way, we follow POSIX's idea of the
command substitution being a separate script more closely. It also matches
other shells better and is consistent with newline characters in quotes not
starting here documents.
The extension tested in parser/heredoc3.0 ($(cat <<EOF)\ntext\nEOF\n)
continues to be supported.
In particular, this change allows things like
cat <<EOF && echo `pwd`
(a `` command substitution after a here document)
which formerly silently used an empty file as the here document, because the
EOF of the inner command "pwd" also forced an empty here document.
Revision Changes Path
1.79 +13 -4 src/bin/sh/parser.c
1.1 +44 -0 src/tools/regression/bin/sh/parser/heredoc4.0 (new)
1.1 +56 -0 src/tools/regression/bin/sh/parser/heredoc5.0 (new)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005301416.o4UEGrOm055374>
