Merge pull request #637 from nwinkler/homebrew-completion

Loading Homebrew Bash Completion if installed
pull/638/head
Nils Winkler 2016-01-05 08:20:05 +01:00
commit cbe8bbc2b4
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,16 @@
#!/usr/bin/env bash
# Loads the system's Bash completion modules.
# If Homebrew is installed (OS X), its Bash completion modules are loaded.
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
if [ $(uname) = "Darwin" ] && command -v brew &>/dev/null ; then
BREW_PREFIX=$(brew --prefix)
if [ -f "$BREW_PREFIX"/etc/bash_completion ]; then
. "$BREW_PREFIX"/etc/bash_completion
fi
fi

View File

@ -89,6 +89,7 @@ else
echo ""
echo -e "\033[0;32mEnabling sane defaults\033[0m"
load_one completion bash-it.completion.bash
load_one completion system.completion.bash
load_one plugins base.plugin.bash
load_one plugins alias-completion.plugin.bash
load_one aliases general.aliases.bash