I'm using the bash completion script for git. However, there are situations where it doesn't work. Say I have a branch foo-branch, and a file foo-file. If I have changes in the file which I want to throw away, I'll often do:
git checkout fo<tab>
This completes immediately to foo-branch. Usually, if there are multiple completion options, I get a bell, and another tab will show me the options. Is there any way to get the completion to work like that in this case as well? Or does the git completion always take precedence over the file name completion?
Edit: I've waded through the bash man page and found -o plusdirs
, which I added to the complete
directive. This works; I'll have to try it for a while to see if it doesn't cause problems with commands that don't take a file name argument.