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
| # This script, whose origin has been lost, will output the current branch and change status in your bash prompt. | |
| # See http://www.incaseofstairs.com/2013/01/osx-frontend-toolchain/ | |
| # | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| function last_two_dirs { | |
| pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_ | |
| } |