From: Peter Stephenson <Peter.Stephenson@csr.com>
To: <zsh-users@zsh.org>
Subject: Re: Why does this extended glob pattern fail?
Date: Mon, 1 Aug 2011 12:04:11 +0100 [thread overview]
Message-ID: <20110801120411.7938f5f4@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <1312194058.12893.2158087337@webmail.messagingengine.com>
On Mon, 1 Aug 2011 12:20:58 +0200
Ronald Fischer <ynnor@mm.st> wrote:
> On Wed, 27 Jul 2011 15:32 +0100, "Stephane Chazelas"
> <stephane.chazelas@gmail.com> wrote:
> > or better, use globbing alternate operator rather than brace
> > expansion:
> >
> > cp ^$from/*.(log|png) $dest
>
> Actually, this does not work either. Instead, I have to write
>
> cp $from/^*.(log|png) $dest
>
> The reason is that ^ doesn't apply to the *whole* word, but only up to
> the first '/'.
I'm delighted to find out I mentioned this feature --- that ^ applies to
path segments --- in "From Bash to Z Shell", chapter 9, page 216. The
stuff round there is a useful read for this kind of thing.
http://www.bash2zsh.com/
--
Peter Stephenson <pws@csr.com> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
next prev parent reply other threads:[~2011-08-01 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 13:53 Ronald Fischer
2011-07-27 14:11 ` Mikael Magnusson
2011-07-27 14:32 ` Stephane Chazelas
2011-08-01 10:20 ` Ronald Fischer
2011-08-01 11:04 ` Peter Stephenson [this message]
2011-08-01 13:24 ` ZyX
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=20110801120411.7938f5f4@pwslap01u.europe.root.pri \
--to=peter.stephenson@csr.com \
--cc=zsh-users@zsh.org \
/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).