![mac git bash completion mac git bash completion](https://phoenixnap.com/kb/wp-content/uploads/2021/04/how-to-install-and-get-started-with-git-on-mac.png)
PS Another answer here suggests installing the hub tool instead: although the tool is handy, it's merely a 3rd party (github community) wrapper around git. It is a sign that something is wrong with ownership of the completion scripts, and it can (and should) be fixed with one of these:Īnother one, will probably work for non-brew zsh, credits to pvinis on GitHub:
#MAC GIT BASH COMPLETION HOW TO#
This post cover simple steps on how to upgrade bash on MacOS. While this will get rid of the warning/confirmation, the warning is there for a reason and it shouldn't happen normally. Mac OS comes with Bash version 3 which is quite limiting and lack key features like the bash associative arrays, improved auto-completion, better Posix conformance, etc. Thanks to for suggesting to use compinit -u to skip the security checks for completion scripts nano /usr/local/etc/bashcompletion.d/git-completion.bash Set git autocompletion and PS1 integration if -f /usr/local/etc/bashcompletion.d/git-completion.bash then.
![mac git bash completion mac git bash completion](https://github.blog/wp-content/uploads/2015/02/e82c9782-b5da-11e4-9e2b-ea1cd3dd131a.png)
zshrc file, don't forget to restart the shell for ZSH to pick up the new config (alternatively, you can execute the line in your current session, that'll enable autocompletion for that one session) the zsh compinit: insecure directories warning zshrc should be enough: autoload -Uz compinit & compinitĪfter you put the line. another one, will probably work for non-brew zsh, credits to pvinis on GitHub: compaudit xargs chmod g-w. Explanation:Īctually, ZSH does know how to do git completion out of the box, but you need to turn on the completion feature itself (which from the steps you described I guess you haven't done)Īdding this to your. It is a sign that something is wrong with ownership of the completion scripts, and it can (and should) be fixed with one of these: brew.sh version: chmod -R go-w ' (brew -prefix)/share'. zshrc and apply the setting to your current terminal session. TL DR one-liner echo 'autoload -Uz compinit & compinit' > ~/.zshrc &.