From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2737 invoked from network); 20 Jun 2000 09:07:18 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Jun 2000 09:07:18 -0000 Received: (qmail 537 invoked by alias); 20 Jun 2000 09:07:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12000 Received: (qmail 527 invoked from network); 20 Jun 2000 09:07:06 -0000 Date: Tue, 20 Jun 2000 10:06:28 +0100 From: Peter Stephenson Subject: Re: more fun with parameter expansion In-reply-to: "Your message of Mon, 19 Jun 2000 11:21:20 EDT." <20000619112120.C32081@scowler.net> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FWG001063YRTL@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > > zmv '(**/)(*)' '${1}${(L)2// /_}' > > MARK_DIRS raises its ugly head again. Changing the odon's to > odon^M made it work as advertised. I scratched my head over this until I released `emulate -L zsh' doesn't set MARK_DIRS, which is a pretty shoddy trick given all the sorts of things expansions in shell functions do nowadays and I've a good mind to change it. I can't think of a good example where that would be wrong. I've just seen a nasty problem if you do something like zmv -Q '(**/)(*)(^/)' since you get the effect of ^odon and the original problem comes back. I won't tackle this now, however. Index: Functions/Misc/zmv =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Misc/zmv,v retrieving revision 1.3 diff -u -r1.3 zmv --- Functions/Misc/zmv 2000/06/19 09:13:45 1.3 +++ Functions/Misc/zmv 2000/06/20 09:05:30 @@ -115,7 +115,7 @@ # non-positional parameters may not start with a number, although # paranoiacs like the author will probably put them there anyway. -emulate -L zsh +emulate -RL zsh setopt extendedglob local f g args match mbegin mend files action myname tmpf opt exec -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070