Skip to content

Instantly share code, notes, and snippets.

@joeybeninghove
Last active December 16, 2016 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeybeninghove/df48952363386288f520ddcbdb1873fa to your computer and use it in GitHub Desktop.
Save joeybeninghove/df48952363386288f520ddcbdb1873fa to your computer and use it in GitHub Desktop.
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