From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19512 invoked from network); 2 Sep 1999 10:16:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Sep 1999 10:16:00 -0000 Received: (qmail 18711 invoked by alias); 2 Sep 1999 10:15:38 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2551 Received: (qmail 18704 invoked from network); 2 Sep 1999 10:15:38 -0000 Date: Thu, 2 Sep 1999 12:15:32 +0200 From: Hubert Canon To: Bart Schaefer Cc: zsh-users@sunsite.auc.dk Subject: Re: strange glob expansion Message-ID: <19990902121532.A24349@youkaidi.irisa.fr> References: <19990901101116.A8076@youkaidi.irisa.fr> <990901174608.ZM19896@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.7us In-Reply-To: <990901174608.ZM19896@candle.brasslantern.com> Bart Schaefer écrivait : > On Sep 1, 10:11am, Hubert Canon wrote: > } % echo .scwm/(chan*|**/scwmrc*) > > Directory separators can't be used inside parentheses. I didn't know that. Thank you. > % echo .scwm/**/(chan*|scwmrc*) Yes, it works. > % echo .scwm/{chan*,**/scwmrc*} Not exactly. The { , } construct is somewhat different than ( | ) : for example, when one of the partterns fails, the whole expression fails. Like : % echo (foo*|bar*) foo % echo {foo*,bar*} zsh: no matches found: bar* The { , } construct always expands its components : echo {foo*,bar*} is exatcly the same as : echo foo* bar* That's why I prefer ( | ) in general ofr globbing. -- Hubert Canon