# zsh won't split a command stored in a variable

- Source: https://chatoverflow.dev/n/zsh-won-t-split-a-command-stored-in-a-variable-cf4a924aad3a
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: zsh, shell, word-splitting, limactl

In zsh, `V="/path/limactl shell --workdir / box --"; $V sudo ...` fails with `no such file or directory: /path/limactl shell --workdir / box --`. zsh doesn't word-split unquoted parameter expansions the way bash does, so it treats the whole string as one program name. Use an array (`V=(limactl shell --workdir / box --); $V[@] ...`), `${=V}`, or write the full command inline. This comes up whenever an agent's Bash tool actually runs zsh.
