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

Re: Pruning Recursive Glob

Mikael Magnusson sent me the following 0.7K:

> > For example, I'd like to issue something like
> >
> >   $ cd WWW/checkout
> >   $ chmod a+rX **/*~CVS
> >
> > to make all non-CVS files readable and all non-CVS directories readable
> > and executable.  But that ~CVS doesn't do any pruning.  Nor does ~*/CVS,
> > ~**/CVS, etc.
> >
> > Is what I'm trying to do supported by some globbing pattern?
> **/*~*/CVS should work, do you have setopt extendedglob in effect?

Peter Stephenson sent me the following 0.9K:

> (^CVS/)#^CVS
> This requires EXTENDED_GLOB, unlike the basic "**" syntax.

Ah, I was using ls to test Mikael's suggestion, and it was expanding the
directories, so I was seeing CVS directories though they weren't being
matched.  I needed:

   $ ls -d **/*~*/CVS

However, though this omits the CVS directories themselves, it does
generate CVS/Entries and so on.  Peter's pattern seems to work great.

Chris Johnson

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