formatted brew completion

pull/1782/head
Gurkirat Singh 2021-01-10 19:20:30 +05:30
parent 500b70d787
commit 43ca459080
No known key found for this signature in database
GPG Key ID: CFD64E1DCB3DA835
1 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@
if [[ "$(uname -s)" != 'Darwin' ]] ; then if [[ "$(uname -s)" != 'Darwin' ]] ; then
_log_warning "unsupported operating system - only 'Darwin' is supported" _log_warning "unsupported operating system - only 'Darwin' is supported"
return 0 return 1
fi fi
# Make sure brew is installed # Make sure brew is installed
@ -13,13 +13,13 @@ _command_exists brew || return 0
BREW_PREFIX=${BREW_PREFIX:-$(brew --prefix)} BREW_PREFIX=${BREW_PREFIX:-$(brew --prefix)}
if [[ -r "$BREW_PREFIX"/etc/bash_completion.d/brew ]] ; then if [[ -r "$BREW_PREFIX"/etc/bash_completion.d/brew ]]; then
source "$BREW_PREFIX"/etc/bash_completion.d/brew source "$BREW_PREFIX"/etc/bash_completion.d/brew
elif [[ -r "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]] ; then elif [[ -r "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]] ; then
source "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh source "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh
elif [[ -f "$BREW_PREFIX"/completions/bash/brew ]] ; then elif [[ -f "$BREW_PREFIX"/completions/bash/brew ]] ; then
# For the git-clone based installation, see here for more info: # For the git-clone based installation, see here for more info:
# https://github.com/Bash-it/bash-it/issues/1458 # https://github.com/Bash-it/bash-it/issues/1458
# https://docs.brew.sh/Shell-Completion # https://docs.brew.sh/Shell-Completion