Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
sstephenson's prompt from rbenv README
# sstephenson's prompt from rbenv
# - Set your theme to Basic
# - Set your font to 13pt Inconsolata
# - Set your ANSI Color for Normal White(7) to Tin (Crayons tab in color picker)
# - Put this at the end of your .profile
# - Help me figure out what his exact font is because it's not Inconsolata.
function parse_git_dirty {
[[ $(git status 2> /dev/null \
| tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
function parse_git_branch {
git branch --no-color 2> /dev/null \
| sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"
export PS1='\[\033[37m\]\w$(parse_git_branch)$\[\033[0m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment