Created
December 2, 2011 15:00
-
-
Save squarism/1423532 to your computer and use it in GitHub Desktop.
sstephenson's prompt from rbenv README
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
# sstephenson's prompt from rbenv | |
# - Set your Terminal.app theme to Basic | |
# - Set your Terminal.app 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