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 committed Jun 17, 2015
1 parent ed6645a commit d24196c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/git/git.plugin.zsh
Original file line number Diff line number Diff line change
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 d24196c

Please sign in to comment.