Skip to content

Instantly share code, notes, and snippets.

@andrehjr
Created April 7, 2011 23:04
Show Gist options
  • Save andrehjr/908971 to your computer and use it in GitHub Desktop.
Save andrehjr/908971 to your computer and use it in GitHub Desktop.
# rvm-install added line:
if [[ -s /Users/andrehjr/.rvm/scripts/rvm ]] ; then source /Users/andrehjr/.rvm/scripts/rvm ; fi
export RUBYOPT="-ropenssl"
rvm use ruby-1.9.2-p136
alias ss='script/server'
alias sc='script/console'
alias rs='rails s'
alias rc='rails c'
alias xc='rake cucumber'
alias xf='git status'
alias xs='rake spec'
alias xd='git diff'
#Terminal Style
WHITE="\[\033[0;37m\]"
RED="\[\033[0;31m\]"
LIGHTRED="\[\033[1;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
LIGHTGREEN="\[\033[1;32m\]"
BLUE="\[\033[0;34m\]"
LIGHTBLUE="\[\033[1;34m\]"
CYAN="\[\033[0;36m\]"
LIGHTCYAN="\[\033[1;36m\]"
BLACK="\[\033[0;30m\]"
DARKGREY="\[\033[1;30m\]"
LIGHTGREY="\[\033[0;37m\]"
PURPLE="\[\033[0;35m\]"
LIGHTPURPLE="\[\033[1;35m\]"
BROWN="\[\033[0;33m\]"
YELLOW="\[\033[1;33m\]"
PS1="$RED~ \W $BLUE\$(parse_git_branch)$RED\$ $WHITE"
#GIT
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
#GIT
function parse_rvm_branch {
ref=$(rvm gemset name 2> /dev/null) || return
echo ""${ref#refs/heads/}""
}
#Ruby
function parse_ruby_branch {
ref=$(ruby -v | perl -n -e '/(\d\.\d\.\d)/ && print "$1\n"' 2> /dev/null) || return
echo ""${ref#refs/heads/}""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment