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

Word split



Hi,

I have a problem with word splitting in 3.1.2:

	x='a::b'
	y=(${(s(:)x})

I wanted $y to hold 3 elements, with an empty $y[2], but the result is
an array with 2 elements, 'a' and 'b'. This would be OK if at least 

	y=("${(@s(:)x}")

gave 3 elements, but it doesn't either. This is inconsistent with the
behaviour of

	setopt shwordsplit; IFS=:; y=($x) 

which results in an array of length 3.

Any comments?

	Bernd

--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



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