diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-05-08 20:40:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 20:40:36 +0200 |
commit | 0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534 (patch) | |
tree | 946d9f8b758ebdd63da96152ca56b154c99068da /plugins/github | |
parent | afb028763cf40fc339e49011b2cba124dc108fcb (diff) | |
parent | ebc700be9b2fa7ae770a644093a5c46a8e323726 (diff) | |
download | zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.gz zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.bz2 zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.zip |
Merge branch 'master' into master
Diffstat (limited to 'plugins/github')
-rw-r--r-- | plugins/github/README.md | 6 | ||||
-rw-r--r-- | plugins/github/_hub | 13 | ||||
-rw-r--r-- | plugins/github/github.plugin.zsh | 12 |
3 files changed, 20 insertions, 11 deletions
diff --git a/plugins/github/README.md b/plugins/github/README.md index fea607876..2b66e390f 100644 --- a/plugins/github/README.md +++ b/plugins/github/README.md @@ -11,14 +11,14 @@ This plugin supports working with GitHub from the command line. It provides a fe * `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub * `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub * `exist_gh` - Takes an existing repo and pushes it to GitHub -* `git.io` - Shortens a URL using [git.io](http://git.io) +* `git.io` - Shortens a URL using [git.io](https://git.io) ## Installation -[Hub](http://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ. +[Hub](https://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ. -The [`github` Ruby gem](http://github.com/defunkt/github-gem) needs to be installed if you want to use it. +The [`github` Ruby gem](https://github.com/defunkt/github-gem) needs to be installed if you want to use it. ### Configuration diff --git a/plugins/github/_hub b/plugins/github/_hub index 3a6493878..209a3df9e 100644 --- a/plugins/github/_hub +++ b/plugins/github/_hub @@ -58,6 +58,7 @@ __hub_setup_zsh_fns () { - set1 \ '-m[message]' \ '-F[file]' \ + '--no-edit[use first commit message for pull request title/description]' \ '-a[user]' \ '-M[milestone]' \ '-l[labels]' \ @@ -84,11 +85,16 @@ __hub_setup_zsh_fns () { hub_commands=( alias:'show shell instructions for wrapping git' pull-request:'open a pull request on GitHub' + pr:'list or checkout a GitHub pull request' + issue:'list or create a GitHub issue' + release:'list or create a GitHub release' fork:'fork origin repo on GitHub' create:'create new repo on GitHub for the current project' + delete:'delete a GitHub repo' browse:'browse the project on GitHub' compare:'open GitHub compare view' - ci-status:'lookup commit in GitHub Status API' + ci-status:'show status of GitHub checks for a commit' + sync:'update local branches from upstream' ) _describe -t hub-commands 'hub command' hub_commands && ret=0 @@ -110,11 +116,16 @@ __hub_setup_bash_fns () { cat <<-EOF alias pull-request +pr +issue +release fork create +delete browse compare ci-status +sync EOF __git_list_all_commands_without_hub } diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 0ab399c97..8e4b97352 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -1,8 +1,6 @@ -# Set up hub wrapper for git, if it is available; http://github.com/github/hub -if [ "$commands[(I)hub]" ]; then - if hub --version &>/dev/null; then - eval $(hub alias -s zsh) - fi +# Set up hub wrapper for git, if it is available; https://github.com/github/hub +if (( $+commands[hub] )); then + alias git=hub fi # Functions ################################################################# @@ -38,7 +36,7 @@ new_gh() { # [DIRECTORY] print '.*'"\n"'*~' >> .gitignore git add [^.]* \ || return - git add .gitignore \ + git add -f .gitignore \ || return git commit -m 'Initial commit.' \ || return @@ -65,7 +63,7 @@ exist_gh() { # [DIRECTORY] # git.io "GitHub URL" # # Shorten GitHub url, example: -# https://github.com/nvogel/dotzsh > http://git.io/8nU25w +# https://github.com/nvogel/dotzsh > https://git.io/8nU25w # source: https://github.com/nvogel/dotzsh # documentation: https://github.com/blog/985-git-io-github-url-shortener # |