Bug 1502015 - hub's bash completion is applying to "git"
Summary: hub's bash completion is applying to "git"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: hub
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-13 17:44 UTC by Ken Dreyer
Modified: 2017-10-16 18:40 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-10-16 13:42:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github github hub issues 1600 0 None None None 2017-10-16 18:40:45 UTC

Description Ken Dreyer 2017-10-13 17:44:24 UTC
Description of problem:
The "hub" bash completion options always apply to the "git" command, even when I don't have "git" aliased to "hub".

Version-Release number of selected component (if applicable):
hub-2.2.9-3.fc26

Steps to Reproduce:
1. dnf install hub
2. Start a new shell (that has hub's bash completion present)
3. In the new shell, type "git br" and hit "tab" to show the completion options

Actual results:
Bash offers two completion options "git branch" and "git browse", even though "browse" is a hub-only command.

Expected results:
Bash expands "git br" to "git branch".
Bash only provides the hub options if "git" has been aliased to the "hub" command.

Additional info:
The "git browse" option comes from /etc/bash_completion.d/hub.bash_completion.sh.

Comment 1 Stephen Gallagher 2017-10-16 13:42:55 UTC
I've opened a bug upstream[1], but for now I'm going to close this BZ as WONTFIX.

The problem is that the bash completion script for `hub` assumes that the alias is being used. I can't easily split it out because the script is fairly complicated. I don't want to remove the bash completion script from the system because then it won't work for `hub`. And I don't want to forcibly install the alias for all users, because that would be unexpected behavior.

So my only real option is to ask upstream to split them up.

[1] https://github.com/github/hub/issues/1600

Comment 2 Ken Dreyer 2017-10-16 18:40:46 UTC
Thanks Stephen!


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