summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2014-06-01 14:18:21 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-06-01 14:18:21 -0700
commit10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a (patch)
tree98f365155cfee78015cef217bcdabd9e8b272cc6 /Test
parent32640: (#q) in [[ ... ]] forces globbing (diff)
downloadzsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar.gz
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar.bz2
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar.lz
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar.xz
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.tar.zst
zsh-10ae77c0cfee1e15fe062ee5a6d8a4b31304d58a.zip
users/18857: add (Y) glob qualifier to generate only one match per pattern
Diffstat (limited to 'Test')
-rw-r--r--Test/D02glob.ztst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 3e1ea8210..d197098b6 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -431,6 +431,7 @@
mkdir glob.tmp/dir5
touch glob.tmp/dir5/N123
print glob.tmp/dir5/N<->(N)
+ rm -rf glob.tmp/dir5
0:Numeric glob is not usurped by process substitution.
>glob.tmp/dir5/N123
@@ -541,3 +542,13 @@
>No file beginning with z
>Multiple files matched
>Normal string if nullglob not set
+
+ (){ print $#@ } glob.tmp/dir*(Y)
+ (){ print $#@ } glob.tmp/file*(NY)
+ (){ [[ $1 = glob.tmp/dir? ]] && echo "(Y) returns a matching filename" } glob.tmp/dir*(Y)
+ (){ print $@:t } glob.tmp/dir*(Y^Y)
+0:short-circuit modifier
+>1
+>0
+>(Y) returns a matching filename
+>dir1 dir2 dir3 dir4