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

A strange quoted nested evaluation issue



Hi,

Can anyone shed some light On This One?

tl;dr: Enclosing a nested length eval on an empty var changes its answer
from 0 to 1 when in double quotes.

% for baz in "" "inga"; do
echo ${#${baz}} "${#${baz}}" ${#baz} "${#baz}"
done
0 1 0 0
4 4 4 4
%

Normally I wouldn't mail the list about this kind of thing, but this one's
just too weird.  Thoughts?

%Ian

-
Ian F
plus one, seven oh seven, seven three seven, four twenty-one zero.

Big hitter, the Lama.


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