Skip to content

Instantly share code, notes, and snippets.

@railsbridge
Created March 11, 2010 16:17
Show Gist options
  • Save railsbridge/329291 to your computer and use it in GitHub Desktop.
Save railsbridge/329291 to your computer and use it in GitHub Desktop.
export PATH=/usr/local/git/bin:/usr/local/bin/src:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:~/bin:/usr/local/pgsql/bin:$PATH
export EDITOR='mate -w'
export PAGER=most
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)]/"
}
function rvm-prompt {
if [ ! -z "$(echo `which ruby` | grep 'rvm')" ] ; then
echo "[$(which ruby | xargs dirname | xargs dirname | xargs basename | tr '-' ':')]"
fi
}
export PS1='\[\033[1;36m\]\h\[\033[0;33m\] $(rvm-prompt) \w \[\033[31;40m\]$(parse_git_branch)\[\033[00m\] $ '
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
EVENT_NOKQUEUE=yes
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi
source /Users/mike/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment