Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 78d0bcf185cf5fd3d645bd8390491b3b5bce699f 1 parent 35e4fe1
lucapette authored

Showing 3 changed files with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. +0 1  zsh/aliases.zsh
  2. +8 0 zsh/functions.zsh
  3. +1 0  zshrc
1  zsh/aliases.zsh
... ... @@ -1,5 +1,4 @@
1 1 alias be='bundle exec'
2   -alias g='git'
3 2 alias git='hub'
4 3 alias h='history'
5 4 alias jekyll='jekyll --server --pygments'
8 zsh/functions.zsh
@@ -13,3 +13,11 @@ up(){
13 13 fi
14 14 cd $d
15 15 }
  16 +
  17 +function g {
  18 + if [[ $# > 0 ]]; then
  19 + git $@
  20 + else
  21 + git st
  22 + fi
  23 +}
1  zshrc
@@ -47,4 +47,5 @@ fpath=(~/.zsh/completions /usr/local/share/zsh-completions $fpath)
47 47 autoload -U compinit
48 48 compinit
49 49
  50 +compdef g=git
50 51 compdef hub=git

0 comments on commit 78d0bcf

Please sign in to comment.
Something went wrong with that request. Please try again.