diff options
Diffstat (limited to 'plugins/github')
| -rw-r--r-- | plugins/github/README.md | 6 | ||||
| -rw-r--r-- | plugins/github/_hub | 2 | ||||
| -rw-r--r-- | plugins/github/github.plugin.zsh | 12 | 
3 files changed, 10 insertions, 10 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..1833a9c09 100644 --- a/plugins/github/_hub +++ b/plugins/github/_hub @@ -89,6 +89,7 @@ __hub_setup_zsh_fns () {        browse:'browse the project on GitHub'        compare:'open GitHub compare view'        ci-status:'lookup commit in GitHub Status API' +      sync:'update local branches from upstream'      )      _describe -t hub-commands 'hub command' hub_commands && ret=0 @@ -115,6 +116,7 @@ create  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  # | 
