From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: Prepend/append to the members of a list
Date: Wed, 1 Nov 2006 12:24:05 +0000 [thread overview]
Message-ID: <20061101122405.1c6bbfb2.pws@csr.com> (raw)
In-Reply-To: <200610311708.k9VH8UX8025695@news01.csr.com>
Peter Stephenson <pws@csr.com> wrote:
> > The PATTERN may begin with a `#', in which case the PATTERN must
> > match at the start of the string, or `%', in which case it must
> > match at the end of the string.
> >
> > Should that doc also say that #% is a legal pattern meaning "anchor
> > the match at both ends of the string"?
>
> With the current code, no, because that's not supported. I
> suppose it would be sensible to add that for compatibility---although
> it does change the syntax in the not particularly likely but by no means
> impossible case that you're substituting a % at the head of a string,
> so I'm not so sure.
I've committed the patch with this change, so ${param/#%foo/bar} does mean
"foo must match the whole element". There's a note in README about the
change.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
prev parent reply other threads:[~2006-11-01 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 17:09 Jörg Sommer
2006-10-30 18:23 ` Nikolai Weibull
2006-10-31 2:54 ` Bart Schaefer
2006-10-31 14:52 ` Peter Stephenson
2006-10-31 16:31 ` Bart Schaefer
2006-10-31 16:40 ` Nikolai Weibull
2006-10-31 18:01 ` Nikolai Weibull
2006-10-31 17:08 ` Peter Stephenson
2006-11-01 12:24 ` Peter Stephenson [this message]
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=20061101122405.1c6bbfb2.pws@csr.com \
--to=pws@csr.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).