summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-04-24 22:02:58 +0200
committerGitHub <noreply@github.com>2018-04-24 22:02:58 +0200
commitef70990ce1ac0239005b267e5dcfe096969d26c3 (patch)
treea625015ca49f45f603a36e3c5a453535fc70e29b /plugins
parent45a9f284641a23baa142743d8a6136d4e300c465 (diff)
downloadzsh-ef70990ce1ac0239005b267e5dcfe096969d26c3.tar.gz
zsh-ef70990ce1ac0239005b267e5dcfe096969d26c3.tar.bz2
zsh-ef70990ce1ac0239005b267e5dcfe096969d26c3.zip
Simplify hub check and hardcode aliasing (#6767)
* Simplify hub check and hardcode aliasing * Update hub completion
Diffstat (limited to 'plugins')
-rw-r--r--plugins/github/_hub2
-rw-r--r--plugins/github/github.plugin.zsh6
2 files changed, 4 insertions, 4 deletions
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..077f07bd4 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
+if (( $+commands[hub] )); then
+ alias git=hub
fi
# Functions #################################################################