From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8875 invoked from network); 6 Sep 2009 21:18:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 6 Sep 2009 21:18:27 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91363 invoked from network); 6 Sep 2009 21:18:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Sep 2009 21:18:06 -0000 Received: (qmail 26283 invoked by alias); 6 Sep 2009 21:17:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27247 Received: (qmail 26259 invoked from network); 6 Sep 2009 21:17:58 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Sep 2009 21:17:58 -0000 Received: from queueout04-winn.ispmail.ntl.com (queueout04-winn.ispmail.ntl.com [81.103.221.58]) by bifrost.dotsrc.org (Postfix) with ESMTP id 10293801E2BF for ; Sun, 6 Sep 2009 23:17:46 +0200 (CEST) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090906184847.ULOM5579.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Sun, 6 Sep 2009 19:48:47 +0100 Received: from pws-pc ([82.6.98.90]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090906184838.JXWZ22934.aamtaout04-winn.ispmail.ntl.com@pws-pc> for ; Sun, 6 Sep 2009 19:48:38 +0100 Date: Sun, 6 Sep 2009 19:48:21 +0100 From: Peter Stephenson To: zsh-workers Subject: Re: zmv -W/-w in subdirs, possibly patch Message-ID: <20090906194821.73936211@pws-pc> In-Reply-To: <237967ef0909051629x73f79a43v49d9baa573c5b19@mail.gmail.com> References: <237967ef0909051629x73f79a43v49d9baa573c5b19@mail.gmail.com> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=QlN_orvj5ewA:10 a=pGLkceISAAAA:8 a=NLZqzBF-AAAA:8 a=UtZCoKJlgw0HvnQJfswA:9 a=AXpSAQ_kmq1yZCp78BF9PajS_CYA:4 a=MSl-tDqOz04A:10 a=_dQi-Dcv4p4A:10 X-Virus-Scanned: ClamAV 0.94.2/9779/Sun Sep 6 11:41:03 2009 on bifrost X-Virus-Status: Clean On Sun, 6 Sep 2009 01:29:50 +0200 Mikael Magnusson wrote: > My question is: Why was the / there in the first place? Would the > above patch break any existing usecases? > (in case it is hard to spot, the patch removes the only / on the > line). If it does break some weird complex > pattern, maybe I would argue that you should not use -w then. I've a suspicion this was supposed to catch **/. This might even work. Index: Functions/Misc/zmv =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Misc/zmv,v retrieving revision 1.14 diff -u -r1.14 zmv --- Functions/Misc/zmv 11 May 2008 11:23:31 -0000 1.14 +++ Functions/Misc/zmv 6 Sep 2009 18:44:18 -0000 @@ -187,7 +187,7 @@ # Well, this seems to work. # The tricky bit is getting all forms of [...] correct, but as long # as we require inactive bits to be backslashed its not so bad. - find='(#m)((\*\*#/|[*?]|<[0-9]#-[0-9]#>|\[(^|)(\]|)(\[:[a-z]##:\]|\\?|[^\]])##\])\##|?\###)' + find='(#m)((\*\*##/|[*?]|<[0-9]#-[0-9]#>|\[(^|)(\]|)(\[:[a-z]##:\]|\\?|[^\]])##\])\##|?\###)' tmp="${pat//${~find}/$[++cnt]}" if [[ $cnt = 0 ]]; then print -r -- "$myname: warning: no wildcards were found in search pattern" >&2 -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/