Bug 494786 - bash completion doesn't work for git-<CMD> forms.
Summary: bash completion doesn't work for git-<CMD> forms.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Chris Wright
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-08 04:40 UTC by Kumar Gala
Modified: 2013-01-10 10:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-05-17 18:50:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kumar Gala 2009-04-08 04:40:33 UTC
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
...

Comment 1 Todd Zullinger 2009-04-08 11:08:30 UTC
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.

Comment 2 Kumar Gala 2009-04-08 14:19:32 UTC
How about having a secondary completion file in /usr/share/git-core

Comment 3 Todd Zullinger 2009-04-08 14:43:31 UTC
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.

Comment 4 Kumar Gala 2009-04-08 15:23:52 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.