Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from gh to hub, the new official GitHub CLI #392

Closed
edubxb opened this issue Jan 6, 2015 · 7 comments
Closed

Move from gh to hub, the new official GitHub CLI #392

edubxb opened this issue Jan 6, 2015 · 7 comments

Comments

@edubxb
Copy link
Member

edubxb commented Jan 6, 2015

The project gh has been adopted as the new official GitHub CLI (hub).

See this: mislav/hub#475

So it is necessary to update:

plugins/available/gh.plugin.bash
completion/available/gh.completion.bash

@edubxb
Copy link
Member Author

edubxb commented Jan 12, 2015

The completion file is basically the same for gh and hub, the command name has changed and some minor changes, I think.

Now hub is in a release candidate state, so we can do the update when finally released.

Additionally, we can add an alias to maintain compatibility (alias gh=hub)

@edubxb
Copy link
Member Author

edubxb commented Jan 14, 2015

Another option is to have separate plugins+completion, one for gh, and other for hub.

@nwinkler
Copy link
Member

Wouldn't it be easier to detect whether the gh or hub command is available?

command -v gh >/dev/null 2>&1 && eval "$(gh alias -s)"
command -v hub >/dev/null 2>&1 && eval "$(hub alias -s)"

Same for the completion.

If there's a chance that you want to have both gh and hub installed, one of them will have to have a higher priority, since you can't alias them both to git.

If the differences are significant, I agree that it would be better to have two different plugin/completion files. If it's just the name of the command, it should be possible to detect which one is installed and then alias that.

@tswicegood
Copy link
Member

👍 for detecting where we can. FWIW, I use hub, so I wouldn't want to do anything that messes with that.

@edubxb
Copy link
Member Author

edubxb commented Sep 6, 2015

Done in PR #562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@tswicegood @nwinkler @edubxb and others