From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: -W option for zmv (updated)
Date: Thu, 28 Mar 2002 18:38:05 -0800 [thread overview]
Message-ID: <020328183805.ZM822@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0203281524340.16964-100000@phong.blorf.net>
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?
next prev parent reply other threads:[~2002-03-29 2:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-28 0:48 Potential improvement for zmv Wayne Davison
2002-03-28 15:59 ` Bart Schaefer
2002-03-29 1:12 ` PATCH: -W option for zmv (updated) Wayne Davison
2002-03-29 2:38 ` Bart Schaefer [this message]
2002-03-29 5:32 ` Wayne Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=020328183805.ZM822@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).