1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

24611: fix ${+array[...]} for empty range

This commit is contained in:
Peter Stephenson 2008-02-27 15:51:26 +00:00
parent 4ff6e11df2
commit 0076d68664
3 changed files with 15 additions and 1 deletions

View file

@ -52,6 +52,14 @@
0:$+...
>1 1 0 0
x=()
print ${+x} ${+x[1]} ${+x[(r)foo]} ${+x[(r)bar]}
x=(foo)
print ${+x} ${+x[1]} ${+x[(r)foo]} ${+x[(r)bar]}
0:$+... with arrays
>1 0 0 0
>1 1 1 0
set1=set1v
null1=
print ${set1:-set1d} ${set1-set2d} ${null1:-null1d} ${null1-null2d} x