zsh-users
 help / color / mirror / code / Atom feed
From: "David Gómez" <david@pleyades.net>
To: Zsh-users <zsh-users@sunsite.dk>
Subject: Re: Question about extended globbing
Date: Sun, 23 Nov 2003 10:09:51 +0100	[thread overview]
Message-ID: <20031123090951.GA21951@fargo> (raw)
In-Reply-To: <20031123002202.GA237@DervishD>

Hi Raúl ;),

>  * Davilín <david@pleyades.net> dixit:
> > grep something $FOO/^{*txt,*info}
> > 
> > but it didn't work. How can I achieve to include several alternatives with
> > the ^ operator?
> 
>     Like this: grep something $FOO/^(*txt|*info)

I knew that the answer had to be simple ;), i just was to sleepy yesterday
to think of this solution ;)).

>     grep something $FOO/^*txt $FOO/^*info
> 
>     That way, when filename generation takes place, it expands the
> first expression, which include any *info file, and then it expands
> the second expression, which contains any *txt file.

I see...

>     I think we are in the second case, brace expansion and after that
> filename generation. 

I think they're are took literally. If a type 'grep something $FOO/^*txt' or
the solution you gave me above, the filenames are generated when Tab is
pressed, but not in the case of the braces, it seems they're are ignored
after the ^ operator.

> See if you have dupes in the generated file list

It works great ;), thanks for your help.


-- 
David Gómez

"The question of whether computers can think is just like the question of
whether submarines can swim." -- Edsger W. Dijkstra


  reply	other threads:[~2003-11-23  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-22 23:55 David Gómez
2003-11-23  0:22 ` DervishD
2003-11-23  9:09   ` David Gómez [this message]
2003-11-23 10:10     ` DervishD
2003-11-24 16:03       ` David Gómez

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=20031123090951.GA21951@fargo \
    --to=david@pleyades.net \
    --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).