zsh-workers
 help / color / mirror / code / Atom feed
* A strange quoted nested evaluation issue
@ 2018-11-19  8:04 Ian F
  2018-11-19 18:39 ` dana
  0 siblings, 1 reply; 3+ messages in thread
From: Ian F @ 2018-11-19  8:04 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-20 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19  8:04 A strange quoted nested evaluation issue Ian F
2018-11-19 18:39 ` dana
2018-11-20 14:26   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).