Last active
December 16, 2016 22:07
-
-
Save joeybeninghove/df48952363386288f520ddcbdb1873fa to your computer and use it in GitHub Desktop.
My Bash Prompt
This file contains 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
# 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