Red Hat Bugzilla – Bug 494786
bash completion doesn't work for git-<CMD> forms.
Last modified: 2013-01-10 05:31:51 EST
It looks like /etc/bash_completion.d/git should have:
complete -o default -o nospace -F _git_am git-am
complete -o default -o nospace -F _git_apply git-apply
The git-* commands are deprecated upstream (and have been for a long time)¹. With git-1.6.0, they were moved out of the PATH by default. For F10, this change didn't make it in time. For F11, we follow upstream and install them in /usr/libexec/git-core. I'd hesitate to patch git in F10 to encourage the use of the dashed form commands, as they are not what users should get used to using.
¹ Since early 2006, and officially announced in the git-1.5.4 release notes.
How about having a secondary completion file in /usr/share/git-core
I don't see the effort being worthwhile. Upstream has clearly deprecated the dashed form commands, so we'd be maintaining this just for F10. IMO, we shouldn't have every had a git-1.6.x with the dashed commands still in the path, that's not going to change for F10 at this point. But that doesn't mean that we should go out of our way to encourage and support using that deprecated form.
I think it should be up to anyone that wants to continue using the deprecated dashed form commands to add their own completion file extending the one that is shipped. For us to do otherwise just further separates us from upstream for very little benefit. What happens when we find subtle bugs in a completion file that we ship which isn't upstream? We'd have to try and fix those issues, again, for little benefit.
The best answer, I believe, is to use the supported git <command> format, which has a rich completion already available and supported by a large and active upstream.
Fair. I guess its just my annoyance that I'm in the habit of git-<TAB> and that works for fc10. Its not helping me break my bad habit :)
Feel free to close this bug.