From: DervishD <raul@pleyades.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Emulating 'locate'
Date: Thu, 2 Oct 2003 10:03:58 +0200 [thread overview]
Message-ID: <20031002080358.GA23230@DervishD> (raw)
In-Reply-To: <1031002023639.ZM22046@candle.brasslantern.com>
Hi Bart :)
* Bart Schaefer <schaefer@brasslantern.com> dixit:
> [We should just go off and have our own little mailing list.]
Well... As I said a few weeks ago, I'm on the way of learning Zsh
and sometimes I practice what is said in the manual doing things like
these. Sometimes I have success, others I don't. I know, I make many
questions, and maybe you are the only able to answer then, so don't
feel guilty if you want to ignore most of them ;)))
I know that I'm boring asking zsh questions every day...
> } Well, I suppose that slashes must be
> } matched explicitly (that is what ** is for...)
> No, that is what **/ is for.
Ok, now I got it. Anyway I used (*/)# too with the same results,
so I thought that ** was magic everywhere in the path.
> I suspect you really did
>
> print /**/*ir2*/*/**
> ^^^ Note only one star here
> when you meant
>
> print /**/*ir2*/**/*
I tried both, but with the last one ir2 was not found at the end
of the path :(((
> But that's still not sufficient, because it requires that *ir2* be only
> an intervening directory and not the last file or directory in the path.
Exactly ;)))
> For that you have to use brace expansion, because you can't mix **/ and
> any other form of alternation:
Didn't know about the mixing...
> locate() { print -l /**/*${^*}*{,/**/*} }
Ok, it works like a charm... Thanks a lot, as always :)
> (You really ought to be sending these questions to -users, not -workers.)
Sorry, I thought I was doing that already, but the mutt aliases I
use for zsh lists were all the same. I did the cut'n'paste but not
the modification, and all aliases go to zsh-workers. Sorry, this
answer goes to zsh-users. Thanks for pointing.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
next parent reply other threads:[~2003-10-02 9:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031001221753.GA23189@DervishD>
[not found] ` <1031002023639.ZM22046@candle.brasslantern.com>
2003-10-02 8:03 ` DervishD [this message]
2003-10-02 14:29 ` Bart Schaefer
2003-10-02 15:53 ` DervishD
2003-10-02 17:08 ` Oliver Kiddle
2003-10-02 19:27 ` DervishD
2003-10-03 16:22 ` Lloyd Zusman
2003-10-04 10:48 ` DervishD
2003-10-04 13:48 ` Lloyd Zusman
2003-10-04 15:12 ` DervishD
2003-10-04 17:05 ` Lloyd Zusman
2003-10-04 21:35 ` DervishD
2003-10-04 16:37 ` Bart Schaefer
2003-10-04 19:33 ` Lloyd Zusman
2003-10-04 21:29 ` DervishD
2003-10-04 22:40 ` Bart Schaefer
2003-10-04 23:18 ` Lloyd Zusman
2003-10-05 15:57 ` Bart Schaefer
2003-10-06 13:37 ` Lloyd Zusman
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=20031002080358.GA23230@DervishD \
--to=raul@pleyades.net \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@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).