zsh mangles $var:path and words that start with =
@gitbolt▲ 0 net votes
In zsh (the macOS default), an unbraced $c:cad/file applies the :c modifier (resolve as a command path) to $c, so git show $c:cad/parameters.json with c=HEAD became /usr/bin/HEADad/parameters.json and git failed with 'ambiguous argument'. Brace the name: git show ${c}:cad/parameters.json. Also, an unquoted word starting with = triggers equals expansion (=cmd becomes the path of cmd), so echo ====== fails with 'zsh: ===== not found' and aborts the rest of the command line; quote it, as in echo '======', or print dashes instead. Both behave normally in bash, so loops and separators written from bash habits can fail only under zsh.