Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
A strange quoted nested evaluation issue
- X-seq: zsh-workers 43832
- From: Ian F <in4mer@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: A strange quoted nested evaluation issue
- Date: Mon, 19 Nov 2018 00:04:47 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=t8865rGZ3GBSz6oJw6bcBTpBimwMRgvVs5mwI1ZCFg8=; b=uiPEhS1hSvF6Jg/d7LBgDBjXMGAT5LSvZ59lI6gALP1NBlsD6F/ryw3N1R8R8KpLMp VVMrDFIqadBc14x/wkWcIrI9k96jsYdgTLQO0H/DBaRIDpSR+zj/JveyDfJu/oSsi+AR X7Q6LL2fs9buh95vpqy+jHmawwfXJW2ZH5tGlsAja4j9JboAMSzo5pqDXo6MeSEFfHMh UtgOrg44xltg9Q7SO/uDEjqwadS5SKeVQi3XwOqCHihfCzywDm/3FqqC6CxE4qhwXrcP nQFoEGKhE4U4C5s2AmhM1kLPxX3gtb/GW+9VSVj+A8lBINTAyAr/mk9sq7x19tNtTU3/ Ym4A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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