bashrc.d: Added bash completion for MacOS stuff

This commit is contained in:
Gregor Bückendorf 2019-05-18 15:48:09 +02:00
parent 89fd8ccd77
commit 536deb63b6
2 changed files with 11 additions and 0 deletions

10
.bashrc.d/brew_caveats.sh Normal file
View file

@ -0,0 +1,10 @@
# Save other operating systems some work
if [[ $OSTYPE != darwin* ]]; then
return
fi
# brew formula bash-completion
if [[ -r /usr/local/etc/profile.d/bash_completion.sh ]]; then
export BASH_COMPLETION_COMPAT_DIR=/usr/local/etc/bash_completion.d
. /usr/local/etc/profile.d/bash_completion.sh
fi

View file

@ -17,6 +17,7 @@ possible_locations=(
"/usr/share/doc/git/contrib/completion/git-completion.bash" "/usr/share/doc/git/contrib/completion/git-completion.bash"
"/usr/share/git/completion/git-completion.bash" "/usr/share/git/completion/git-completion.bash"
"/usr/share/bash-completion/completions/git" "/usr/share/bash-completion/completions/git"
"/usr/local/etc/bash_completion.d/git-completion.bash"
) )
for completion_file in "${possible_locations[@]}" for completion_file in "${possible_locations[@]}"