Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Excluding certain directories
- X-seq: zsh-users 11781
 
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
 
- To: zzapper <david@xxxxxxxxxx>
 
- Subject: Re: Excluding certain directories
 
- Date: Mon, 20 Aug 2007 09:05:36 -0400
 
- Cc: zsh-users@xxxxxxxxxx
 
- In-reply-to: <Xns99927746C1B45zzappergmailcom@xxxxxxxxxxx>
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- References: <Xns99927746C1B45zzappergmailcom@xxxxxxxxxxx>
 
zzapper sent me the following 0.2K:
> Hi
> I want to exclude subdirectories dev*
> ls {^dev*,}/index.php(.N)
> 
> 
> The above appears to work OK, any alternatives? and how would I make it 
> multi-depth
Here's one approach:
   ls -d **/*~**/dev/*~**/dev
It's not entirely correct, since you can have a plain file named dev
that's ignored by the last clause.  It'd be nice to be able to embed
glob qualifiers (/) into the negated pattern clauses, but it seems
that's not supported.
-- 
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author