From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18322 invoked from network); 29 Mar 2002 02:38:20 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Mar 2002 02:38:20 -0000 Received: (qmail 15484 invoked by alias); 29 Mar 2002 02:38:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16927 Received: (qmail 15471 invoked from network); 29 Mar 2002 02:38:12 -0000 From: "Bart Schaefer" Message-Id: <020328183805.ZM822@candle.brasslantern.com> Date: Thu, 28 Mar 2002 18:38:05 -0800 In-Reply-To: Comments: In reply to Wayne Davison "PATCH: -W option for zmv (updated)" (Mar 28, 5:12pm) References: X-Mailer: Z-Mail Lite (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: -W option for zmv (updated) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 28, 5:12pm, Wayne Davison wrote: > > x=(x x x x x x) > > print ${(e)x//x/\$[++N]} > > Thanks! That's the nudge I needed to make things more efficient. > > + find='(#m)(\*\*#[/]|[*?]|\<[0-9]#-[0-9]#\>|\[(\[:[a-z]##:\]|\\\[|\\\]|[^\[\]]##)##\])\##' > + tmp="${pat//${~find}/$[++cnt]}" and later > + integer N=0 > + repl="${repl//${~find}/$open$[++N]$close}" That doesn't work for me: schaefer[501] find=x open=\$\{ close=\} schaefer[502] repl=xxxxxx schaefer[503] N=0 schaefer[504] repl="${repl//${~find}/$open$[++N]$close}" schaefer[505] echo $repl ${1}${1}${1}${1}${1}${1} It should be repl="${(e)repl//${~find}/\$open\$[++N]\$close}" Are you sure you sent the correct version of the patch?