I using macos 10.14.2 (18C54) with zsh (latest version I couldn't find any versioning with zsh). If I create an array from a string it works. But If i use a variable containing the string split does not work. Is this expected behavior or something wrong with my environment? What is the correct way to do this if I am doing it wrong?
~ arr=(foo bar) ~ echo $arr foo ~ val='foo bar' ~ arr=($val) ~ echo $arr foo bar