From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4910 invoked from network); 8 Dec 2003 17:29:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Dec 2003 17:29:31 -0000 Received: (qmail 1045 invoked by alias); 8 Dec 2003 17:29:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6849 Received: (qmail 914 invoked from network); 8 Dec 2003 17:29:15 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Dec 2003 17:29:15 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Dec 2003 17:29:15 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Mon, 8 Dec 2003 17:29:06 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 8 Dec 2003 17:30:40 +0000 To: Zsh Users' List Subject: Re: Excluding files in CVS directories in filename generation In-reply-to: "Hannu Koivisto"'s message of "Mon, 08 Dec 2003 19:11:02 +0200." <87y8tnfd5l.fsf@lynx.tre-1.ionific.com> Date: Mon, 08 Dec 2003 17:29:09 +0000 Message-ID: <10346.1070904549@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 08 Dec 2003 17:30:40.0067 (UTC) FILETIME=[FFD6D930:01C3BDB0] Hannu Koivisto wrote: > Greetings, > > If I want a pattern that matches all files in the current directory > and its descendant directories excluding files in directories named > CVS, why doesn't > > **/*~**/CVS/*(.) > > work? Files in "$(pwd)/CVS" are not excluded with that pattern and > instead I have to say > > **/*~CVS/*~**/CVS/*(.) Yes, indeed. Luckily, you can do: (^CVS/)#*(.) This is the more general form of ** --- the pattern in the parentheses is used (here anything but the string CVS) instead of a `*' to match directory names. More precisely, **/ (*/)# are equivalent. That's why you don't need another / after the parentheses. You need extended_glob, but you must already have it set in this case. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************