Created
May 6, 2014 15:00
-
-
Save thekid/0c2674db32b67065175b to your computer and use it in GitHub Desktop.
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
| branch_info() { | |
| branch=`git name-rev HEAD --name-only 2>/dev/null` | |
| if [ 0 = $? ] ; then | |
| printf "$1" $branch | |
| fi | |
| } | |
| export PS1="\[\e]0;\w\a\]\n\[\e[31m\]\u@\h \[\e[36m\]\w\$(branch_info ' [\[\033[01;32m\]%s\[\033[01;36m\]] ')\[\e[0m\]\n\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment