Skip to content

Instantly share code, notes, and snippets.

@rdavila
Created December 11, 2010 00:35
Show Gist options
  • Save rdavila/737030 to your computer and use it in GitHub Desktop.
Save rdavila/737030 to your computer and use it in GitHub Desktop.
git_prompt_bash
function prompt {
local LIGHT_RED="\[\033[1;31m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local NO_COLOUR="\[\033[0m\]"
local TITLEBAR='\[\033]0;\u@\h\007\]'
source ~/.git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM=auto
export GIT_PS1_SHOWSTASHSTATE=true
PS1="$TITLEBAR\w/$LIGHT_GREEN\$(__git_ps1 '(%s)') $LIGHT_RED\$(~/.rvm/bin/rvm-prompt i v g)$NO_COLOUR$ "
}
#call the prompt function to set things in motion
prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment