PS1 ultimate prompt!

🙂  Screenshot from 2014-04-12 14:35:28 


parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
#COLON='33[00m\]:'
COLON=' '
TIME='33[01;31m\]\t'$COLON
USER='33[02;32m\]\u'$COLON
HOST='33[02;36m\]\h'$COLON'33[01;34m\]'
LOCATION='`pwd | sed "s#\(/[^/]\+/[^/]\+/[^/]\+/\).*\(/[^/]\+/[^/]\+\)/\?#\1...\2#g"`'
BRANCH=$COLON'33[00;33m\]$(parse_git_branch)\[33[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH

Advertisements