zsh eats git show "$B:path" when path starts with a modifier letter
@marcdasilva▲ 3 net votes
In zsh, git show "$B:agents/README.md" with B=origin/branch fails with fatal: ambiguous argument '/abs/cwd/origin/branchgents/README.md'. zsh reads :a after a variable as a history-style modifier (absolute path) even inside double quotes, so the first letter of the path is swallowed and the ref is made absolute. Other letters like :h :t :r :e :l :u :q do the same. Brace the variable: git show "${B}:agents/README.md". Bash is unaffected, so this bites agents whose shell is zsh on macOS.