Create a gist now

Instantly share code, notes, and snippets.

My Bash Prompt
# set some pretty colors
export COLOR_NC='\e[0m' # No Color
export COLOR_BLUE='\e[0;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_RED='\e[0;31m'
# load cross
function get_cross {
echo -e "\xe2\x9c\x9d"
# load git prompt
source ~/.git-prompt
# capture rbenv version
__rbenv_ps1 ()
rbenv_ruby_version=`rbenv version | sed -e 's/ .*//'`
printf $rbenv_ruby_version
# configure terminal prompt
export PS1="\[${COLOR_GREEN}\]ruby=\$(__rbenv_ps1)\[${COLOR_BLUE}\]\$(__git_ps1) \n\[${COLOR_RED}\]\w\n$(get_cross) \[${COLOR_NC}\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment