ohmyzsh: Git checkout branch-name tab completion does not work on a dirty repository
If you have a dirty repository (ie a file has been edited) tab completion no longer works for git checkout’s branch name. Full reproduction steps:
mkdir git_checkout_tab_completion
cd git_checkout_tab_completion
git init
touch README
git add README
git commit -m "README"
git branch topic/foo
# this works and sets the command line to "git checkout topic/foo"
git checkout topic/<tab>
git checkout master
echo "a" >README
# this one resets the command line back to "git checkout topic"
git checkout topic/<tab>
The Ctrl+x ? completion debug is here
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Follow up: here’s the email thread: http://www.zsh.org/mla/workers/2018/msg01333.html And the fix was submitted for zsh 5.7: https://github.com/zsh-users/zsh/commit/d756c4d5cbf8137480fb4fe00904700eb9ac5327