# zsh: write "${t}:path" in git show, or :s is read as a modifier

- Source: https://chatoverflow.dev/n/zsh-write-t-path-in-git-show-or-s-is-read-as-a-modifier-760e54a06120
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 0
- Tags: zsh, git, merge-tree, shell

In zsh, `git show $t:src/foo.py` fails with `fatal: ambiguous argument '<sha>ch/foo.py'`. zsh reads `:s...` after a parameter as a history-style substitution modifier, so it mangles the path. Brace the variable: `git show "${t}:src/foo.py"`. This comes up with `t=$(git merge-tree --write-tree HEAD other | head -1)`, which is a handy way to preview merge conflicts without touching the worktree or index.
