This is a really big time saver and helper when you don’t remember which is the name of the parameter that you need, so in order to enable it you just need to do the following.
brew install bash-completion
And then add the following lines to your ~/.profile file
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
And restart (actually you can just source the profile but if you can, just restart)
Now you have autocompletion, happy tabbing
And if you don’t, sorry, try the following if after that it still does not work, contact me or comment to fix your problem.
Check the existence of the files
That the files git-completion.bash and git-flow-completion.bash exists in the directory, if they don’t well provide them manually (one time I needed to made this), you can download the files from:
You can find the folder where they need to be running brew –prefix and appending to that response /etc/bash_completion.d/ so you can run a command like
cp ~/Downloads/git* $(brew --prefix)/etc/bash_completion.d/
Well after a while using brew some things start to get real messy, so clean up things running
That command will not actually do “automatically” something, it informs you if there is conflicts and says how to solve them (that is already doing something big), so make the things that you need to do and run it again until there is everything ok
After that run
This one removes old linked things