On my linux machine I have autocomplete for branches with git.
For example I can type git checkout [TAB] and get a list of branches.
Or I can type git checkout feb* [TAB] to get all branches that begin with "feb".
How can I get this functionality on a Mac?
I tried downloading and running bash-completion/bash_completion and bash-completion/bash_completion.sh.in but no joy. The first gave error messages about declare: -A invalid_option. The second gave no errors. When I git checkout [TAB] though I am still getting a list of files in the directory, not branches. I am in the project root.
Auto-complete for directories and bash commands are working ok, so it's specific to git.
completestatements in your.bashrc(or.bash_profile) on the Linux box. As for the downloaded files, where did you download them from? – patrix♦ Jul 8 '12 at 18:46