On Fri, Mar 02, 2018 at 11:58:41AM +0100, Harald van Dijk wrote:
> >If we fix this in the parser then everything should just work.
> Right, that's the approach FreeBSD sh has taken that I referred to in my
> message from Feb 18, that I'd personally prefer as well. It basically
> involves reverting 7cfd8be0dc83342b4a71f3a8e5b7efab4670e50c, setting syntax
> to BASESYNTAX/DQSYNTAX (whichever is appropriate) when the parse of a
> variable expansion starts, and finding a sensible way to change the syntax
> back to BASESYNTAX/DQSYNTAX/ARISYNTAX when it ends. In FreeBSD sh, an
> explicit stack of syntaxes is created for this, but that might be avoidable:
> with slight modifications to what gets stored in the byte after
> CTLVAR/CTLARI, it might be possible to go back through the parser output to
> determine the syntax to revert to. I'll see if I can get that working.
Yes but that's overkill just to fix single quote within patterns.
We already support nested double-quotes in patterns correctly. As
single quotes cannot nest, it should be an easy fix.
Email: Herbert Xu <herb...@gondor.apana.org.au>
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 majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html