From 6f2376daa23930387e95891777776344f5ba481c Mon Sep 17 00:00:00 2001 From: Hongyi Zhao Date: Thu, 19 Dec 2019 16:53:24 +0800 Subject: [PATCH] touch up completion/available/brew.completion.bash --- completion/available/brew.completion.bash | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/completion/available/brew.completion.bash b/completion/available/brew.completion.bash index 572c9389..9d010f05 100644 --- a/completion/available/brew.completion.bash +++ b/completion/available/brew.completion.bash @@ -1,18 +1,13 @@ 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 + elif [ -f "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh ]; then . "$BREW_PREFIX"/Library/Contributions/brew_bash_completion.sh - fi - - # 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 - if [ -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: + # https://github.com/Bash-it/bash-it/issues/1458 + # https://docs.brew.sh/Shell-Completion . "$BREW_PREFIX"/completions/bash/brew fi fi