Frage

I changed from Mac Port to Homebrew

I am using zsh, I installed brew git git-extra and bash-completion. i still don't see git auto completion like mac ports used to show it.

War es hilfreich?

Lösung 2

You need to add the configs to you .zshrc as below

zstyle ':completion:*:*:git:*' script
/usr/local/etc/bash_completion.d/git-completion.bash


fpath=(/usr/local/share/zsh/site-functions $fpath)

Andere Tipps

Seems like you need to get zsh-completions

Configuring Completions in zsh

To make Homebrew’s completions available in zsh, you must get the Homebrew-managed zsh site-functions on your FPATH before initialising zsh’s completion facility. Add the following to your ~/.zshrc file:

if type brew &>/dev/null
then
  FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"

  autoload -Uz compinit
  compinit
fi

Additionally, if you receive “zsh compinit: insecure directories” warnings when attempting to load these completions, you may need to run this:

chmod -R go-w "$(brew --prefix)/share"

Source: https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top