From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22908 invoked from network); 6 Apr 2004 17:55:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Apr 2004 17:55:21 -0000 Received: (qmail 17511 invoked by alias); 6 Apr 2004 17:55:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19743 Received: (qmail 17500 invoked from network); 6 Apr 2004 17:55:11 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Apr 2004 17:55:11 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 6 Apr 2004 17:55:11 -0000 Received: (qmail 10758 invoked from network); 6 Apr 2004 17:55:11 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 6 Apr 2004 17:55:09 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id 3D5887496; Tue, 6 Apr 2004 10:55:08 -0700 (PDT) Date: Tue, 6 Apr 2004 10:55:07 -0700 From: Wayne Davison To: Peter Stephenson Cc: Zsh hackers list Subject: Re: PATCH: Re: Globbing for Empty Directories? Message-ID: <20040406175507.GC10632@blorf.net> References: <9E7AF602-8085-11D8-AA68-000502631FBD@louisville.edu> <20040401184336.DC34B8646@pwstephenson.fsnet.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cmJC7u66zC7hs+87" Content-Disposition: inline In-Reply-To: <20040401184336.DC34B8646@pwstephenson.fsnet.co.uk> User-Agent: Mutt/1.5.5.1+cvs20040105i 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 --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I thought it would be nice to test the new 'F'ull-directory glob modifier, so I'm planning to commit these changes to D02glob.ztst. ..wayne.. --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="globtest.patch" --- Test/D02glob.ztst 3 Dec 2003 10:54:36 -0000 1.3 +++ Test/D02glob.ztst 6 Apr 2004 17:33:46 -0000 @@ -2,8 +2,8 @@ %prep mkdir glob.tmp - mkdir glob.tmp/dir1 - mkdir glob.tmp/dir2 + mkdir glob.tmp/dir{1,2,3,4} + mkdir glob.tmp/dir3/subdir : >glob.tmp/{,{dir1,dir2}/}{a,b,c} globtest () { $ZTST_testdir/../Src/zsh -f $ZTST_srcdir/../Misc/$1 } @@ -265,11 +265,11 @@ ( regress_absolute_path_and_core_dump ) 0:exclusions regression test > ->glob.tmp/a glob.tmp/b glob.tmp/c glob.tmp/dir1 glob.tmp/dir1/a glob.tmp/dir1/b glob.tmp/dir1/c glob.tmp/dir2 glob.tmp/dir2/a glob.tmp/dir2/b glob.tmp/dir2/c +>glob.tmp/a glob.tmp/b glob.tmp/c glob.tmp/dir1 glob.tmp/dir1/a glob.tmp/dir1/b glob.tmp/dir1/c glob.tmp/dir2 glob.tmp/dir2/a glob.tmp/dir2/b glob.tmp/dir2/c glob.tmp/dir3 glob.tmp/dir3/subdir glob.tmp/dir4 print glob.tmp/*(/) 0:Just directories ->glob.tmp/dir1 glob.tmp/dir2 +>glob.tmp/dir1 glob.tmp/dir2 glob.tmp/dir3 glob.tmp/dir4 print glob.tmp/*(.) 0:Just files @@ -281,7 +281,7 @@ print glob.tmp/**/(:h) 0:Head modifier ->. glob.tmp glob.tmp +>. glob.tmp glob.tmp glob.tmp glob.tmp glob.tmp/dir3 print glob.tmp(:r) 0:Remove extension modifier @@ -289,5 +289,16 @@ print glob.tmp/*(:s/./_/) 0:Substitute modifier ->glob_tmp/a glob_tmp/b glob_tmp/c glob_tmp/dir1 glob_tmp/dir2 +>glob_tmp/a glob_tmp/b glob_tmp/c glob_tmp/dir1 glob_tmp/dir2 glob_tmp/dir3 glob_tmp/dir4 + print glob.tmp/*(F) +0:Just full dirs +>glob.tmp/dir1 glob.tmp/dir2 glob.tmp/dir3 + + print glob.tmp/*(^F) +0:Omit full dirs +>glob.tmp/a glob.tmp/b glob.tmp/c glob.tmp/dir4 + + print glob.tmp/*(/^F) +0:Just empty dirs +>glob.tmp/dir4 --cmJC7u66zC7hs+87--