Skip to content

Instantly share code, notes, and snippets.

@jerry
Created July 25, 2010 17:58
Show Gist options
  • Save jerry/489727 to your computer and use it in GitHub Desktop.
Save jerry/489727 to your computer and use it in GitHub Desktop.
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
alias ss='script/server'
alias e='mate .'
alias lsa="ls -alF"
alias sc="script/console"
alias sg="script/generate"
alias gp="git push origin master"
alias rs="touch tmp/restart.txt"
alias tl="tail -f log/development.log"
export EDITOR="/usr/bin/mate"
export CLICOLOR=1
export MAGICK_HOME="$HOME/ImageMagick-6.6.3"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"
export PATH=$MAGICK_HOME/bin:/usr/local/mysql:/usr/local/mysql/bin:/Users/jerry/.gem/ruby/1.8/bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment