* Re: more fun with parameter expansion
[not found] <20000619112120.C32081@scowler.net>
@ 2000-06-20 9:06 ` Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2000-06-20 9:06 UTC (permalink / raw)
To: Zsh hackers list
> > 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 <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-20 9:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20000619112120.C32081@scowler.net>
2000-06-20 9:06 ` more fun with parameter expansion Peter Stephenson
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).