On Tue, Mar 27, 2018 at 06:48:45PM +0200, Harald van Dijk wrote:
> 
> Backslashes coming from parameters, sure, but backslashes introduced by
> preglob(), I'm not so sure.

Right.  I guess we could change it so that CTLESC is preserved
to distinguish between the backslashes from parameter expansion
vs. backslashes from open input.

> The [ character would mark the whole string possibly-meta in expandmeta(),
> and the CTLESC wouldn't be seen there. Then, preglob() turns it into \[, and
> expmeta() wouldn't take [ as a meta character, but would take \ as a meta
> character.

Oh I though you were talking about test/[, I didn't see the set.
But why would someone do set "["?

> Then, how about moving some of expmeta()'s checks to return early outside of
> it, so that they can also be done in the glob() case?

We could.

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

Reply via email to