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

Re: Pruning Recursive Glob



On Mon, Jan 26, 2009 at 09:53:29AM -0500, Chris Johnson wrote:
[...]
> 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.
[...]

Yes, you'd need:

ls -d **/*~(*/|)CVS(|/*)

The pattern on the rhs of ~ applies to the whole path (and / is
not special, it's pattern matching not globbing there).

-- 
Stéphane



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