For this you need to follow below steps:
- Install Homebrew if not already installed.
- Install Git and bash-completion: brew install bash-completion
- Add bash-completion to your ~/.bash_profile
. $(brew --prefix)/etc/bash_completion
fi
If you follow above steps as in [1] most probably it won't work. If it didn't work follow below steps:
Download following files to BREW_PREFIX/etc/bash_completion.d/ directory (Find BREW_PREFIX by brew --prefix command)
And then add following to the ~/.bash_profile and source it.
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
if [ -f $(brew --prefix)/etc/bash_completion.d/git-completion.bash ]; then
. $(brew --prefix)/etc/bash_completion.d/git-completion.bash
fi
if [ -f `brew --prefix`/etc/bash_completion.d/git-flow-completion.bash ]; then
. `brew --prefix`/etc/bash_completion.d/git-flow-completion.bash
fi
[1] https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion
[2] https://github.com/bobthecow/git-flow-completion/issues/46
No comments:
Post a Comment