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

Re: Bug with bash emulation regarding ':'



On Sun, 29 Jan 2012 04:46:35 +0200
Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:
> _test ()
> {
> 	array="one two three"
> 	for e in $array
> 	do
> 		echo "'$e'"
> 	done
> }
> 
> l=
> : ${l:=$(_test)}
> echo "_${l}_"
>...
> _'one two three'_

As this is OK with

l=$(_test)

presumably something is going on with quoting and/or tokenisation in or
close to multsub(), which is some of the hairier code in substitution,
when SH_WORD_SPLIT is in effect.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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