parser: Fix single-quoted patterns in here-documents
commit9ee3343965950bad08e97f43c8c376b89a50b099
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Mar 2018 15:07:53 +0000 (9 23:07 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 21 Mar 2018 16:29:58 +0000 (22 00:29 +0800)
tree8b58e39c7bc29bf6b99f505c2ebe62cbb84090f2
parentab1cecb4047864afb247a6ed691e7f59ce716f2c
parser: Fix single-quoted patterns in here-documents

The script

x=*
cat <<- EOF
${x#'*'}
EOF

prints * instead of nothing as it should.  The problem is that
when we're in sqsyntax context in a here-document, we won't add
CTLESC as we should.  This patch fixes it:

Reported-by: Harald van Dijk <harald@gigawatt.nl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/parser.c