1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 17:20:25 +02:00

users/18870: fix glob scanner insert counting check.

Was causing problems with globs in paths with (Y) glob qualifier
This commit is contained in:
Daniel Shahaf 2014-06-02 12:57:23 +00:00 committed by Peter Stephenson
parent f5ad1ccbd6
commit 06a4913245
3 changed files with 22 additions and 10 deletions

View file

@ -546,9 +546,14 @@
(){ print $#@ } glob.tmp/dir*(Y)
(){ print $#@ } glob.tmp/file*(NY)
(){ [[ $1 = glob.tmp/dir? ]] && echo "(Y) returns a matching filename" } glob.tmp/dir*(Y)
# Can be negated
(){ print $@:t } glob.tmp/dir*(Y^Y)
(){ [[ $#@ -eq 1 ]] && print Globs before last path component } glob.tmp/dir?/subdir(NY)
(){ [[ $#@ -eq 0 ]] && print Respects qualifiers } glob.tmp/dir?/subdir(NY.)
0:short-circuit modifier
>1
>0
>(Y) returns a matching filename
>dir1 dir2 dir3 dir4
>Globs before last path component
>Respects qualifiers