From c5e8349f698e36ed28265e9c4e6b485a0ed17322 Mon Sep 17 00:00:00 2001 From: Ahmad Assaf Date: Wed, 29 Aug 2018 15:00:46 +0100 Subject: [PATCH] Fixing Error when starting Terminal after installing Bash-IT --- completion/available/system.completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/available/system.completion.bash b/completion/available/system.completion.bash index b044627c..f9a3b29f 100644 --- a/completion/available/system.completion.bash +++ b/completion/available/system.completion.bash @@ -20,8 +20,8 @@ if [ $(uname) = "Darwin" ] && command -v brew &>/dev/null ; then . "$BREW_PREFIX"/etc/bash_completion fi - # homebrew/versions/bash-completion2 (required for projects.completion.bash) is installed to this path - if [ -f "$BREW_PREFIX"/share/bash-completion/bash_completion ]; then + # homebrew/versions/bash-completion2 (required for projects.completion.bash) is installed to this path + if [ "${BASH_VERSINFO}" -ge 4 ] && [ -f "$BREW_PREFIX"/share/bash-completion/bash_completion ]; then . "$BREW_PREFIX"/share/bash-completion/bash_completion fi fi