Created
August 22, 2013 19:01
-
-
Save jkutner/6311339 to your computer and use it in GitHub Desktop.
.profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------ | |
# git repo and branch info | |
parse_git_branch () { | |
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (git::\1)#' | |
} | |
parse_svn_branch() { | |
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk '{print " (svn::"$1")" }' | |
} | |
parse_svn_url() { | |
svn info 2>/dev/null | sed -ne 's#^URL: ##p' | |
} | |
parse_svn_repository_root() { | |
svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p' | |
} | |
BLACK="\[\033[0;38m\]" | |
RED="\[\033[0;31m\]" | |
RED_BOLD="\[\033[01;31m\]" | |
BLUE="\[\033[01;34m\]" | |
GREEN="\[\033[0;32m\]" | |
WHITE="\[\033[0;37m\]" | |
# git tab completion | |
#source ~/bin/git-completion.bash | |
#PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' | |
export PS1="$WHITE[$BLUE\w$WHITE]$GREEN(\$(~/.rvm/bin/rvm-prompt u))$RED\$(parse_git_branch)$BLACK$ \[\e[0m\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment