Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zshexpn problem



Hi,

When LVERSION=2.6.10 ... why:

print ${(s/./)LVERSION[1]}
-> 2
print ${(s/./)LVERSION[2]}
->
print ${(s/./)LVERSION[3]}
-> 6
print ${(s/./)LVERSION[4]}
->
print ${(s/./)LVERSION[5]}
-> 1
print ${(s/./)LVERSION[6]}
-> 0

... and not ...

print ${(s/./)LVERSION[3]}
-> 2
print ${(s/./)LVERSION[3]}
-> 6
print ${(s/./)LVERSION[3]}
-> 10

Something like ...

print ${${(s/./)LVERSION}[1]}
-> 2
print ${${(s/./)LVERSION}[1]}
-> 6
print ${${(s/./)LVERSION}[1]}
-> 10

... works 'correct', but is seems not very intelligent.



Messages sorted by: Reverse Date, Date, Thread, Author