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
# show git branch in prompt | |
# got it from https://gist.github.com/790086 | |
parse_git_branch() { | |
ref=$(git symbolic-ref -q HEAD 2> /dev/null) || return | |
printf "${1:-(%s)}" "${ref#refs/heads/}" | |
} | |
parse_svn_revision() { | |
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //') |