From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16160 invoked from network); 28 Jun 2004 11:29:37 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 28 Jun 2004 11:29:37 -0000 Received: (qmail 13654 invoked from network); 28 Jun 2004 12:39:12 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jun 2004 12:39:12 -0000 Received: (qmail 11251 invoked by alias); 28 Jun 2004 11:28:51 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7609 Received: (qmail 11241 invoked from network); 28 Jun 2004 11:28:50 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 28 Jun 2004 11:28:50 -0000 Received: (qmail 12668 invoked from network); 28 Jun 2004 12:38:45 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 28 Jun 2004 12:38:34 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i5SBSZv08180; Mon, 28 Jun 2004 13:28:35 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1Bersq-0000QO-00>; Mon, 28 Jun 2004 10:53:00 +0200 Date: Mon, 28 Jun 2004 10:53:00 +0200 From: DervishD To: Aaron Davies Cc: zsh-users@sunsite.dk Subject: Re: Suppressing "no matches found" Glob Message? Message-ID: <20040628085300.GA1443@DervishD> Mail-Followup-To: Aaron Davies , zsh-users@sunsite.dk References: <2A3E94EA-C7E3-11D8-9C37-000502631FBD@columbia.edu> <20040627104222.GA237@DervishD> <6D3CE77E-C88C-11D8-A1EE-000A95EDC31A@louisville.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6D3CE77E-C88C-11D8-A1EE-000A95EDC31A@louisville.edu> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Aaron :) * Aaron Davies dixit: > >Yes, change your pattern to, for example 'ls **/*(.N)'. The 'N' > >means 'set option NULL_GLOB' for this pattern. This removes the > >error. > NULL_GLOB seems to remove the pattern entirely, so it no longer finds > plain files only. NULL_GLOB makes zsh deleting the pattern if no match is found, but happens that 'ls', without options, prints all files and dirs in the current directory. > I think what I want may be NOMATCH instead, but I > can't figure out a code to set that. Is there one? Don't know, but you don't want NOMATCH set: it *prints* an error if a match is not found. If you unset it, what you are going to have is the pattern as-is, so 'ls' will complain saying that '**/*(.)' doesn't exist. In certain sense, what you want is impossible. If you issue the 'ls' command with parameters, it will list those parameters (if they exist), but if you don't give it params, it will list all files and dirs. You cannot have a way of 'ls' shutting its mouth up if the pattern doesn't match anything. If you want that behaviour, use 'print' instead of 'ls'. Something like 'print -l **/*(.N)' will do. If you want all details for the files you will need a loop or something like that. Hope that helps :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/