Files
bash-it/completion/available/brew.completion.bash
Mike Fiedler 23da5508cc Reduce subshell forks with variable
By following the established pattern in https://github.com/Bash-it/bash-it/blob/master/completion/available/system.completion.bash#L17-L22
we can reduce the amount of `fork` calls that are made.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2017-09-28 07:13:45 -04:00

12 lines
336 B
Bash

if which brew >/dev/null 2>&1; then
BREW_PREFIX=$(brew --prefix)
if [ -f "$BREW_PREFIX"/etc/bash_completion.d/brew ]; then
. "$BREW_PREFIX"/etc/bash_completion.d/brew
fi
if [ -f "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]; then
. "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh
fi
fi