57f55e69ed967e93c0fd44a6a7e470781eb38029
- Author
- Jakub Nawalaniec <pielgrzym@prymityw.pl>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Zsh will now complete git aliases with git stuff
Diff
1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
2index 71a62819bbd5decbd8de84a83f14ee98fbc56925..fc4e56fac1df7cc7db3cef9cbb45471cabe59c5b 100644
3--- a/plugins/git/git.plugin.zsh
4+++ b/plugins/git/git.plugin.zsh
5@@ -1,19 +1,34 @@
6 # Aliases
7 alias g='git'
8+compdef g=git
9 alias gst='git status'
10+compdef gst=git
11 alias gl='git pull'
12+compdef gl=git
13 alias gup='git fetch && git rebase'
14+compdef gup=git
15 alias gp='git push'
16+compdef gp=git
17 alias gd='git diff | mate'
18+compdef gd=git
19 alias gdv='git diff -w "$@" | vim -R -'
20+compdef gdv=git
21 alias gc='git commit -v'
22+compdef gc=git
23 alias gca='git commit -v -a'
24+compdef gca=git
25 alias gco='git checkout'
26+compdef gco=git
27 alias gb='git branch'
28+compdef gb=git
29 alias gba='git branch -a'
30+compdef gba=git
31 alias gcount='git shortlog -sn'
32+compdef gcount=git
33 alias gcp='git cherry-pick'
34+compdef gcp=git
35 alias glg='git log --stat --max-count=5'
36+compdef glg=git
37
38 # Git and svn mix
39 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
40@@ -29,5 +44,8 @@ function current_branch() {
41
42 # these aliases take advantage of the previous function
43 alias ggpull='git pull origin $(current_branch)'
44+compdef ggpull=git
45 alias ggpush='git push origin $(current_branch)'
46+compdef ggpush=git
47 alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
48+compdef ggpnp=git