Harald van Dijk <[email protected]> wrote: > > Changing dash to support this would in my opinion be unreasonable, as it > would require a total rewrite of the parser.
I don't think it's that hard. ---8<--- Subject: parser: Fix backquote support in here-document EOF mark Currently using backquotes in a here-document EOF mark is broken because dash tries to do command substitution on it. This patch fixes it by checking whether we're looking for an EOF mark during tokenisation. Reported-by: Harald van Dijk <[email protected]> Signed-off-by: Herbert Xu <[email protected]> diff --git a/src/parser.c b/src/parser.c index 382658e..283ed63 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1012,6 +1012,11 @@ quotemark: } break; case CBQUOTE: /* '`' */ + if (checkkwd & CHKEOFMARK) { + USTPUTC('`', out); + break; + } + PARSEBACKQOLD(); break; case CEOF: -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
