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

Re: PATCH: short-circuiting glob exclusion operator



On Mar 21,  6:36pm, Peter Stephenson wrote:
}
} This is a request for comments for now.  I'm not yet entirely sure the
} pattern syntax with two tildes isn't going to cause problems (though I
} don't see what they would be), or that I've identified all the side
} effects that can happen.

As Mikael has already pointed out, files with names ending in a tilde
followed by an exclusion pattern may cause trouble with this.

(Incidentally, you already can't use nameddirs or ~/ in exclusions, so
that's not at issue.)

} As an ultra brief summary, ~~ in a glob introduces a pattern that will
} prune directories on the way through in addition to acting in the normal
} exclusion fashion.

I don't suppose it would instead be possible to special-case something at
the END of the pattern?  E.g. **/*~*/foo/** where the trailing /** means
to prune at whatever precedes it.  I suppose that conflicts with the new
GLOB_STAR_SHORT option, although ultimately it means exactly the same in
context.

Aside:  Do we really want to add this before we've figured out the
background for "Extended globbing seems to have become much slower"?



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