From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26899 invoked from network); 23 Nov 2003 09:10:12 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Nov 2003 09:10:12 -0000 Received: (qmail 20560 invoked by alias); 23 Nov 2003 09:09:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6808 Received: (qmail 20497 invoked from network); 23 Nov 2003 09:09:57 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Nov 2003 09:09:57 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [213.97.199.90] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Nov 2003 9:9:57 -0000 Received: (qmail 21978 invoked by uid 500); 23 Nov 2003 09:09:51 -0000 Date: Sun, 23 Nov 2003 10:09:51 +0100 From: David =?iso-8859-15?Q?G=F3mez?= To: Zsh-users Subject: Re: Question about extended globbing Message-ID: <20031123090951.GA21951@fargo> References: <20031122235540.GA21492@fargo> <20031123002202.GA237@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20031123002202.GA237@DervishD> User-Agent: Mutt/1.4.1i Hi Raúl ;), > * Davilín 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