Created
December 8, 2010 19:44
-
-
Save xxx/733793 to your computer and use it in GitHub Desktop.
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
export EDITOR=vim | |
function proml { | |
local BLUE="\[\e[0;34m\]" | |
local LIGHT_BLUE="\[\e[1;34m\]" | |
local GREEN="\[\e[0;32m\]" | |
local CYAN="\[\e[0;36m\]" | |
local MAGENTA="\[\e[0;35m\]" | |
local BROWN="\[\e[0;33m\]" | |
local YELLOW="\[\e[1;33m\]" | |
local RED="\[\e[0;31m\]" | |
local LIGHT_RED="\[\e[1;31m\]" | |
local LIGHT_GREY="\[\e[0;37m\]" | |
local WHITE="\[\e[1;37m\]" | |
local BLACK="\[\e[0;30m\]" | |
#local GREY="\[\e[1;30m\]" | |
local GREY="\[\e[38;5;8m\]" | |
local NO_COLOUR="\[\e[0m\]" | |
local ORANGE="\[\e[38;5;202m\]" | |
local MILD_BLUE="\[\e[38;5;33m\]" | |
case $TERM in | |
xterm*|rxvt*) | |
TITLEBAR='\[\e]0;\u:\w\007\]' | |
;; | |
*) | |
TITLEBAR="" | |
;; | |
esac | |
function parse_git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[[ $? == 1 ]] && echo "*" | |
} | |
function parse_git_branch { | |
local branch=$(__git_ps1 "%s") | |
[[ $branch ]] && echo "[$branch$(parse_git_dirty)]" | |
} | |
export PS1="\`if [ \$? = 0 ]; then echo \[\e[33m\]^_^\[\e[0m\]; else echo \[\e[31m\]X_X\[\e[0m\]; fi\` ${TITLEBAR}${NO_COLOUR}${GREY}[${MILD_BLUE}\$(date +%H:%M)${GREY}][${MILD_BLUE}\u${WHITE}:${MILD_BLUE}\w${GREY}]${ORANGE}\$(parse_git_branch)${NO_COLOUR}\$ " | |
#export PS1=${TITLEBAR}${NO_COLOUR}${GREY}'['${MILD_BLUE}'$(date +%H:%M)'${GREY}']['${MILD_BLUE}'\u'${WHITE}':'${MILD_BLUE}'\w'${GREY}']'${GREEN}'$(parse_git_branch)'${NO_COLOUR} | |
export PS2='> ' | |
export PS4='+ ' | |
} | |
function completion { | |
if [ -f /usr/local/etc/bash_completion ]; then | |
. /usr/local/etc/bash_completion | |
fi | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
} | |
completion | |
proml | |
# rvm installer added line: | |
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment