Permalink
Browse files

Default g to git status. Awesome. Thanks to @pengwynn

  • Loading branch information...
1 parent 35e4fe1 commit 78d0bcf185cf5fd3d645bd8390491b3b5bce699f @lucapette committed Mar 11, 2013
Showing with 9 additions and 1 deletion.
  1. +0 −1 zsh/aliases.zsh
  2. +8 −0 zsh/functions.zsh
  3. +1 −0 zshrc
View
1 zsh/aliases.zsh
@@ -1,5 +1,4 @@
alias be='bundle exec'
-alias g='git'
alias git='hub'
alias h='history'
alias jekyll='jekyll --server --pygments'
View
8 zsh/functions.zsh
@@ -13,3 +13,11 @@ up(){
fi
cd $d
}
+
+function g {
+ if [[ $# > 0 ]]; then
+ git $@
+ else
+ git st
+ fi
+}
View
1 zshrc
@@ -47,4 +47,5 @@ fpath=(~/.zsh/completions /usr/local/share/zsh-completions $fpath)
autoload -U compinit
compinit
+compdef g=git
compdef hub=git

0 comments on commit 78d0bcf

Please sign in to comment.