0

I recently got a new MacBook for work and had to setup a new dev environment, and the tab-completion for git commands isn't working the way it does on my old machine. I used to be able to type git checkout 1234 and it would tab-complete to git checkout EXAMPLE-1234, but now it doesn't. It also seems to be case sensitive and doesn't recognise any branches when I type git checkout example-, I have to type git checkout EXAMPLE- for it to suggest anything. Also, if I just type git che, it doesn't show me the different command options like it does in the docs, it just completes to git checkout. I feel like I've tried all the solutions I've found in different threads, and nothing seems to work. What am I doing wrong?

For reference, here's my .zshrc:

export ZSH="/Users/adambelton/.oh-my-zsh"
export PATH="/usr/local/bin:$PATH"
ZSH_THEME="robbyrussell"
plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
  • Can you show us the `.zshrc` of your old machine, especially the `plugins=` line? – Ortomala Lokni Jun 20 '20 at 13:06
  • It's the same. Same plugins. The only difference is that I was using nvm on the old machine, so I was exporting `NVM_DIR`. – Adam Belton Jun 22 '20 at 07:40
  • To be clear, if I type `git checkout EXAMPLE-1`, I _do_ see all the options for branches that begin that way, so _some_ form of tab-completion is loading, it's just doesn't seem to be the behaviour explained in `https://git-scm.com/book/id/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh`, and it's not working the way it used to. – Adam Belton Jun 22 '20 at 08:11

0 Answers0