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

Re: array prepend



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



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