.bashrc: Add bash_completion for Mac OS X

Will allow you to tab complete stuff like ssh remote paths etc once
you install it via brew:

        brew install bash-completion

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2014-10-08 20:47:19 +03:00
parent 19a886ed14
commit cc08a87d6a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -8,6 +8,10 @@
# OS-specific things
if [[ "$OSTYPE" =~ ^darwin.*$ ]]; then
PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
else
alias less='less -R' # preserves colors in `less`
fi