Created
March 2, 2015 01:35
-
-
Save noodlehaus/9ff0b2d4f9fa17b050bc to your computer and use it in GitHub Desktop.
bash prompt
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
# get bash completion for brew | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# git prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/' | |
} | |
# clean prompt | |
export PS1="\w\$(parse_git_branch) \$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment