From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6182 invoked by alias); 6 Jun 2014 04:24:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32726 Received: (qmail 6448 invoked from network); 6 Jun 2014 04:24:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140605212400.ZM17857@torch.brasslantern.com> Date: Thu, 05 Jun 2014 21:24:00 -0700 In-reply-to: <20140606024519.GD2055@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: [PATCH] Re: (Y) modifier: up to N matches?" (Jun 6, 2:45am) References: <20140602182346.GB1858@tarsus.local2> <140602204603.ZM26905@torch.brasslantern.com> <20140604020804.GA2032@tarsus.local2> <140603234229.ZM29030@torch.brasslantern.com> <20140604230835.GD1970@tarsus.local2> <25969.1402010685@thecus.kiddle.eu> <20140606024519.GD2055@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] Re: (Y) modifier: up to N matches? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 6, 2:45am, Daniel Shahaf wrote: } Subject: Re: [PATCH] Re: (Y) modifier: up to N matches? } } % mkdir -p A/B/foo A/foo } % echo **/foo(Y1) } A/foo } } It may be worthwhile adding a unit test for this to Test/D02glob to } ensure this behaviour doesn't change. I think the existing tests of **/ would fail if this changed, so yet another test is probably not necessary, but if wanted: diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 358c934..a40e154 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -550,6 +550,7 @@ (){ print "Negated:" $@:t } glob.tmp/dir*(Y1^Y) (){ print "Sorting:" $@:t } glob.tmp/dir*(Y4On) (){ [[ $#@ -eq 1 ]] && print Globs before last path component } glob.tmp/dir?/subdir(NY1) + (){ [[ $1 == glob.tmp/a ]] } glob.tmp/**/a(Y1) && print Breadth first (){ [[ $#@ -eq 0 ]] && print Respects qualifiers } glob.tmp/dir*(NY1.) (print -- *(Y)) 2>/dev/null || print "Argument required" 0:short-circuit modifier @@ -560,5 +561,6 @@ >Negated: dir1 dir2 dir3 dir4 >Sorting: dir4 dir3 dir2 dir1 >Globs before last path component +>Breadth first >Respects qualifiers >Argument required