From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Re: (Y) modifier: up to N matches?
Date: Thu, 05 Jun 2014 21:24:00 -0700 [thread overview]
Message-ID: <140605212400.ZM17857@torch.brasslantern.com> (raw)
In-Reply-To: <20140606024519.GD2055@tarsus.local2>
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
prev parent reply other threads:[~2014-06-06 4:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 18:23 Daniel Shahaf
2014-06-03 3:46 ` Bart Schaefer
2014-06-04 2:08 ` [PATCH] " Daniel Shahaf
2014-06-04 6:01 ` Mikael Magnusson
2014-06-04 6:54 ` Bart Schaefer
2014-06-04 6:42 ` Bart Schaefer
2014-06-04 9:25 ` Peter Stephenson
2014-06-04 23:08 ` Daniel Shahaf
2014-06-04 23:16 ` Bart Schaefer
2014-06-05 4:45 ` Bart Schaefer
2014-06-05 23:24 ` Oliver Kiddle
2014-06-06 2:20 ` Bart Schaefer
2014-06-06 2:40 ` Daniel Shahaf
2014-06-06 2:45 ` Daniel Shahaf
2014-06-06 4:24 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=140605212400.ZM17857@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).