Skip to content

Instantly share code, notes, and snippets.

@RyanS
Created June 2, 2010 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RyanS/422911 to your computer and use it in GitHub Desktop.
Save RyanS/422911 to your computer and use it in GitHub Desktop.
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin
bind "set completion-ignore-case on"
export EDITOR='vim'
export CLICOLOR=1
export LSCOLORS="DxfxcxdxbxegDbabagacad"
prompt() {
git=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'`
ruby=`~/.rvm/bin/rvm-prompt`
if [[ $ruby == 'system' && $git == "" ]]; then
return 0
fi
if [ $ruby == 'system' ]; then
ruby=""
fi
echo -en "\033[1;36m"
echo -en '----------- '
echo -en "\033[0;32m"
echo -en $git
echo -en " \033[0;31m"
echo -en $ruby
echo -en "\033[m"
echo
}
parse_git_branch() {
echo -en "\033[1;36m"
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/-----------\1------------/'
echo -en "\033[m"
}
display_rvm_info() {
RUBY_TYPE=`~/.rvm/bin/rvm-prompt i v`
if [ 'system' = $RUBY_TYPE ] ; then
echo -en " "
else
echo -en " "
echo -en $RUBY_TYPE
echo -en " "
fi
}
export PROMPT_COMMAND="prompt"
PS1='\w \$ '
if [[ -s /Users/poopsock/.rvm/scripts/rvm ]] ; then source /Users/poopsock/.rvm/scripts/rvm ; fi
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment