599831b85a5fd4564ab820530e2bb45f37ca3f99
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #4058 from ncanceill/plugin-git
[Hotfix] Git plugin
Diff
1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
2index d59e0ca9f92f2a09e455299afa4c4b4e24427af1..cc6eb1031b1063be5639af3312713ca95fe79513 100644
3--- a/plugins/git/git.plugin.zsh
4+++ b/plugins/git/git.plugin.zsh
5@@ -101,11 +101,15 @@ git push --force origin "${b:=$1}"
6 }
7 compdef _git ggf=git-checkout
8 ggl() {
9+if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
10+git pull origin "${*}"
11+else
12 [[ "$#" == 0 ]] && local b="$(current_branch)"
13-git pull origin "${b:=$1}" "${*[2,-1]}"
14+git pull origin "${b:=$1}"
15+fi
16 }
17 compdef _git ggl=git-checkout
18-alias ggpull='ggl'
19+alias ggpull='git pull origin $(current_branch)'
20 compdef _git ggpull=git-checkout
21 ggp() {
22 if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
23@@ -116,7 +120,7 @@ git push origin "${b:=$1}"
24 fi
25 }
26 compdef _git ggp=git-checkout
27-alias ggpush='ggp'
28+alias ggpush='git push origin $(current_branch)'
29 compdef _git ggpush=git-checkout
30 ggpnp() {
31 if [[ "$#" == 0 ]]; then