zsh-users
 help / color / mirror / code / Atom feed
* ${(s::)VAR} vs "${(s::)VAR}"
@ 2012-04-26 20:48 Kynn Jones
  2012-04-27 20:38 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Kynn Jones @ 2012-04-26 20:48 UTC (permalink / raw)
  To: zsh-users

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

Hi!

I was surprised by the following (note that the first output consists of
3 lines while the second output consists of 4; the only difference between
the two cases is that the first one iterates over ${(s::)VAR} while the
second does so over its double-quoted variant, "${(s::)VAR}"):

% (VAR=123; for c ( ${(s::)VAR} ) echo ">$c<")
>1<
>2<
>3<
% (VAR=123; for c ( "${(s::)VAR}" ) echo ">$c<")
>1<
>2<
>3<
><

Even after-the-fact I cannot explain this difference.  I would appreciate
a description of what's going on (and that, I hope, will lead to the
sought-after explanation).

Thanks!

kj

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

end of thread, other threads:[~2012-04-29 18:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 20:48 ${(s::)VAR} vs "${(s::)VAR}" Kynn Jones
2012-04-27 20:38 ` Peter Stephenson
2012-04-28  2:50   ` Bart Schaefer
2012-04-29 18:22     ` Peter Stephenson
2012-04-29 18:41     ` 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).