Created
October 31, 2012 05:39
-
-
Save goodell/3985045 to your computer and use it in GitHub Desktop.
beginning of a possible fix for mislav/hub#231
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-alias | |
#description show shell instructions for wrapping git | |
_arguments \ | |
'-s[output shell script suitable for eval]' \ | |
'1::shell:(zsh bash csh)' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-browse | |
#description browse the project on GitHub | |
_arguments \ | |
'-u[user or user/repository]:user or user/repository:' \ | |
'::subpage:(wiki commits issues)' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-compare | |
#description open GitHub compare view page | |
# FIXME ideally this wouldn't be needed (the zstyle functionality may be | |
# deprecated in the future), but since "hub compare" isn't actually a | |
# "git-compare" executable that ends up in the $commands array, _git_commands | |
# doesn't want to offer it when completing 'git compa<TAB>'. | |
# | |
# DOUBLE FIXME this doesn't work because the _git-compare script is never | |
# autoloaded until a completion is requested on "git compare <TAB>"... | |
zstyle ':completion:*:*:hub:*' user-commands compare:'open GitHub compare view page' | |
_arguments \ | |
'-u[user]:user:' \ | |
':[start...]end range:' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-create | |
#description create new repo on GitHub for the current project | |
_arguments \ | |
'::name (REPOSITORY or ORGANIZATION/REPOSITORY):' \ | |
'-p[make repository private]' \ | |
'-d[description]:description' \ | |
'-h[home page]:repository home page URL:_urls' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-fork | |
#description fork origin repo on GitHub | |
_arguments \ | |
'--no-remote[do not add a remote for the new fork]' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef git-pull-request | |
#description open a pull request on GitHub | |
# TODO could actually reach out and look some of this information up on GH | |
_arguments \ | |
'-f[force (skip check for local commits)]' \ | |
'-b[base]:base ("branch", "owner\:branch", "owner/repo\:branch"):' \ | |
'-h[head]:head ("branch", "owner\:branch", "owner/repo\:branch"):' \ | |
- set1 \ | |
'::title:' \ | |
- set2 \ | |
'::issue-url:_urls' \ | |
- set3 \ | |
'-i[issue]:issue number:' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment