activate git cli autocomplete for zsh on macos

Viewed 30

New Mac ships with git but cli auto completion is not activated.

For reference:

  • git --version: git version 2.32.1 (Apple Git-133)
  • $SHELL --version: zsh 5.8.1 (x86_64-apple-darwin21.0)
  • Mac M1
1 Answers

I searched for this for too long. Hopefully this helps the next person.

Add this to your ~/.zshrc

autoload -Uz compinit
compinit

Then run this command to update your shell:
source ~/.zshrc

Related