In bash, one variable can act as multiple arguments:
bash-3.2$ debug() {
> echo num args: $#
> }
bash-3.2$ args="1 2 3"
bash-3.2$ debug $args
num args: 3
bash-3.2$ exit
In zsh, this same code treats $args as a single variable:
➜ debug() {
echo num args: $#
}
➜ args="1 2 3"
➜ debug $args
num args: 1
How do I make zsh treat a variable as multiple args the way that bash does?