Skip to content

Commit

Permalink
git plugin: fix ggl to avoid empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
ncanceill authored and NobbZ committed May 14, 2016
1 parent f780cb8 commit 8e6dc3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/git/git.plugin.zsh
Expand Up @@ -101,8 +101,12 @@ git push --force origin "${b:=$1}"
}
compdef _git ggf=git-checkout
ggl() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git pull origin "${*}"
else
[[ "$#" == 0 ]] && local b="$(current_branch)"
git pull origin "${b:=$1}" "${*[2,-1]}"
git pull origin "${b:=$1}"
fi
}
compdef _git ggl=git-checkout
alias ggpull='git pull origin $(current_branch)'
Expand Down

0 comments on commit 8e6dc3d

Please sign in to comment.