From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27877 invoked from network); 28 Feb 2006 18:26:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Feb 2006 18:26:24 -0000 Received: (qmail 23256 invoked from network); 28 Feb 2006 18:26:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Feb 2006 18:26:18 -0000 Received: (qmail 25669 invoked by alias); 28 Feb 2006 18:26:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9967 Received: (qmail 25660 invoked from network); 28 Feb 2006 18:26:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Feb 2006 18:26:10 -0000 Received: (qmail 22065 invoked from network); 28 Feb 2006 18:26:10 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 28 Feb 2006 18:26:09 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k1SIQ6QI021155; Tue, 28 Feb 2006 12:26:06 -0600 (CST) (envelope-from dan) Date: Tue, 28 Feb 2006 12:26:06 -0600 From: Dan Nelson To: zzapper Cc: zsh-users@sunsite.dk Subject: Re: alias limg='ls *.{jpg,gif}(.N)' Message-ID: <20060228182605.GB51610@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 In the last episode (Feb 28), zzapper said: > I was proud of my little alias > > alias limg='ls *.{jpg,gif}(.N)' > > But it has a teeny-weeny fault; if no image is found it lists everything How about: alias limg='ls *.(jpg|gif)(.)' which uses a single glob pattern and no NULL_GLOB, so zsh will complain if the pattern doesn't match anything. -- Dan Nelson dnelson@allantgroup.com