On Tue, Mar 27, 2018 at 11:16:29AM +0200, Harald van Dijk wrote: > > If you say that quote removal takes place on the original token (meaning > before parameter expansion), and if parameter expansion takes place before > pathname expansion, then there's nothing left to allow \* to behave > differently from *.
Either you misunderstood me or you misread POSIX. Quote removal never applies to the backslashes which occur as a result of parameter expansion: 2.6.7 Quote Removal The quote characters ( <backslash>, single-quote, and double-quote) that were present in the original word shall be removed unless they have themselves been quoted. It's clear that only quote characters in the *original* word will be removed. > POSIX never actually says this optimisation is allowed. The only thing that > allows it is the fact that it produces the same results anyway. If that > stops, then checking the file system for matches becomes required. It doesn't disallow it either. Can you show me a shell that doesn't apply this optimisation? Cheers, -- 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