Merge pull request #1469 from hongyi-zhao/master

Fix completion/available/brew.completion.bash

Closes #1458
pull/1449/head
Nils Winkler 2019-12-30 17:11:23 +01:00 committed by GitHub
commit b9af75a494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -1,11 +1,13 @@
if which brew >/dev/null 2>&1; then if which brew >/dev/null 2>&1; then
BREW_PREFIX=$(brew --prefix) BREW_PREFIX=$(brew --prefix)
if [ -f "$BREW_PREFIX"/etc/bash_completion.d/brew ]; then if [ -f "$BREW_PREFIX"/etc/bash_completion.d/brew ]; then
. "$BREW_PREFIX"/etc/bash_completion.d/brew . "$BREW_PREFIX"/etc/bash_completion.d/brew
fi elif [ -f "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]; then
if [ -f "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]; then
. "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh . "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh
elif [ -f "$BREW_PREFIX"/completions/bash/brew ]; then
# For the git-clone based installation, see here for more info:
# https://github.com/Bash-it/bash-it/issues/1458
# https://docs.brew.sh/Shell-Completion
. "$BREW_PREFIX"/completions/bash/brew
fi fi
fi fi