From 971f9111016815097951323b54ba2311d1023deb Mon Sep 17 00:00:00 2001 From: George Wyatt Date: Fri, 25 Nov 2016 13:51:25 +0800 Subject: [PATCH] Load bash-completion2 on macOS This is required for projects completion, otherwise you get this error: ``` _init_completion: command not found ``` --- completion/available/system.completion.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/completion/available/system.completion.bash b/completion/available/system.completion.bash index aeaa5375..ed4167f6 100644 --- a/completion/available/system.completion.bash +++ b/completion/available/system.completion.bash @@ -13,4 +13,9 @@ if [ $(uname) = "Darwin" ] && command -v brew &>/dev/null ; then if [ -f "$BREW_PREFIX"/etc/bash_completion ]; 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 + . "$BREW_PREFIX"/share/bash-completion/bash_completion + fi fi