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

Re: array prepend



On Sat, Jan 19, 2013 at 08:41:37AM -0800, Bart Schaefer wrote:
> On Jan 19,  3:53pm, Han Pingtian wrote:
> }
> } Looks like when SHWORDSPLIT is on, both VAR+=$x and VAR+=($x) will
> } perform splitting on $x:
> 
> You're forgetting that when SHWORDSPLIT is on, $array will perform
> splitting on $array.
> 
> torch% setopt shwordsplit
> torch% array=(foo bar);v="xxx yyy";array+=$v;print -l "${array[@]}"
> foo
> bar
> xxx yyy
Thank you, Bart.



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