Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing

Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Bruce Stephens wrote:

> > I can only think of one candidate at present: ignore dots.  #d, say.
> > Then, a single pattern could match README, READ.ME, Read.Me and so on:
> > (#di)readme.
> > 
> > But my example is strained, I don't really suggest that it would be a
> > good idea.
> I completely agree, there is a whole new set of globbing options
> on the horizon ;-)
> About the `options for the whole path' thing (which I would like to
> have, too): why not use a generic approach, like the `^' and `-' glob
> modifiers, i.e. `(#i)' works on the current path component, probably
> only up to the next `(#...)' and `(#/i)' works on this and all
> following components (until switched off again).

Yes, maybe.  I thought of another example: approximate matching.

Approximate matching could either use the auto-correct code, or could
use something like whatever agrep uses.  In the latter case, it would
have an optional integer parameter too, so "(#a1)readme" would match
"Readme" and "read.me", but to match "read", you'd need "(#a2)readme".

Hmm, maybe this could provide a way to configure the autocorrection
feature too?

Messages sorted by: Reverse Date, Date, Thread, Author