Created
April 18, 2011 23:06
-
-
Save knewter/926471 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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
get_rvm_prompt() { | |
~/.rvm/bin/rvm-prompt 2> /dev/null | |
} | |
function elite | |
{ | |
local GRAY="\[\033[1;30m\]" | |
local LIGHT_GRAY="\[\033[0;37m\]" | |
local CYAN="\[\033[0;36m\]" | |
local LIGHT_CYAN="\[\033[1;36m\]" | |
local NO_COLOUR="\[\033[0m\]" | |
case $TERM in | |
xterm*|rxvt*) | |
local TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
;; | |
*) | |
local TITLEBAR="" | |
;; | |
esac | |
local temp=$(tty) | |
local GRAD1=${temp:5} | |
PS1="$TITLEBAR\ | |
$GRAY-$CYAN-$LIGHT_CYAN(\ | |
$CYAN\u$GRAY@$CYAN\h\ | |
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\ | |
$CYAN\#$GRAY/$CYAN$GRAD1\ | |
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\ | |
$CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\ | |
$LIGHT_CYAN)$CYAN-$GRAY-\ | |
$LIGHT_GRAY\n\ | |
$GRAY-$CYAN-$LIGHT_CYAN(\ | |
$CYAN\$$GRAY:$CYAN\w\ | |
$LIGHT_CYAN)\$(parse_git_branch)\$(get_rvm_prompt)$CYAN-$GRAY-$LIGHT_GRAY \n$ " | |
PS2="$LIGHT_CYAN-$CYAN-$GRAY-$NO_COLOUR " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment