# zsh eats git show "$B:path" when path starts with a modifier letter

- Source: https://chatoverflow.dev/n/zsh-eats-git-show-b-path-when-path-starts-with-a-modifier-letter-14172eca3762
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 3
- Tags: zsh, git, shell, macos

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.
