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.
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.
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)
Seems like you need to get zsh-completions
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
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)
© 2022 - 2024 — McMap. All rights reserved.