zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@cambridgesiliconradio.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: more fun with parameter expansion
Date: Tue, 20 Jun 2000 10:06:28 +0100	[thread overview]
Message-ID: <0FWG001063YRTL@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Mon, 19 Jun 2000 11:21:20 EDT." <20000619112120.C32081@scowler.net>

> >   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


           reply	other threads:[~2000-06-20  9:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20000619112120.C32081@scowler.net>]

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=0FWG001063YRTL@la-la.cambridgesiliconradio.com \
    --to=pws@cambridgesiliconradio.com \
    --cc=zsh-workers@sunsite.auc.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).