aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2015-04-10 18:07:39 +0200
committerMathias Bynens <mathias@qiwi.be>2015-04-11 17:48:42 +0200
commit1d6664ec420ff19dae837def525f1b7af1cef8f6 (patch)
treee94b54027200341ac9fa18c7fb63de7bd20c591c
parentc9395c28c3dcebe1d22b783e1d11f52811f826da (diff)
downloaddotfiles-1d6664ec420ff19dae837def525f1b7af1cef8f6.tar.gz
dotfiles-1d6664ec420ff19dae837def525f1b7af1cef8f6.tar.bz2
dotfiles-1d6664ec420ff19dae837def525f1b7af1cef8f6.zip
brew.sh: Use bash-completion2 for improved Bash 4 completion
Hat tip: @elyscape in https://github.com/mathiasbynens/dotfiles/commit/91be10dcee350465566a48cbe303686d2d989d6d#commitcomment-10654929.
-rw-r--r--.bash_profile4
-rwxr-xr-xbrew.sh3
2 files changed, 4 insertions, 3 deletions
diff --git a/.bash_profile b/.bash_profile
index daa7552..4db6384 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -26,8 +26,8 @@ for option in autocd globstar; do
done;
# Add tab completion for many Bash commands
-if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then
- source "$(brew --prefix)/etc/bash_completion";
+if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
+ source "$(brew --prefix)/share/bash-completion/bash_completion";
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion;
fi;
diff --git a/brew.sh b/brew.sh
index 6e0aed5..bf5e871 100755
--- a/brew.sh
+++ b/brew.sh
@@ -29,7 +29,8 @@ brew install gnu-sed --with-default-names
# Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before
# running `chsh`.
brew install bash
-brew install bash-completion
+brew tap homebrew/versions
+brew install bash-completion2
# Install `wget` with IRI support.
brew install wget --with-iri