activate brew completions only if brew is available
This commit is contained in:
parent
108be77525
commit
882e8e5ed9
1 changed files with 2 additions and 3 deletions
|
@ -42,12 +42,11 @@ if type doctl > /dev/null 2>&1; then
|
|||
source <(doctl completion bash)
|
||||
fi
|
||||
|
||||
HOMEBREW_PREFIX=$(brew --prefix)
|
||||
if type brew &>/dev/null; then
|
||||
if command -v brew; then
|
||||
HOMEBREW_PREFIX=$(brew --prefix)
|
||||
for COMPLETION in "$HOMEBREW_PREFIX"/etc/bash_completion.d/*; do
|
||||
[[ -f $COMPLETION ]] && source "$COMPLETION"
|
||||
done
|
||||
|
||||
if [[ -f ${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh ]]; then
|
||||
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue