Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created January 7, 2011 16:51
Show Gist options
  • Save zeroeth/769722 to your computer and use it in GitHub Desktop.
Save zeroeth/769722 to your computer and use it in GitHub Desktop.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function ruby_symbol {
rvm-prompt u
}
function ruby_gemset {
rvm-prompt g
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local PURPLE="\[\033[0;35m\]"
local CLEAR="\[\033[0m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local WHITE="\[\033[1;37m\]"
local CYAN="\[\033[0;36m\]"
local LIGHT_CYAN="\[\033[1;36m\]"
PS1="${TITLEBAR}$BLUE\u$CLEAR\$(ruby_symbol)$PURPLE\h$CLEAR:\W$GREEN\$(parse_git_branch)$CYAN\$(ruby_gemset)$BLUE\$$CLEAR "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment