This file contains 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
__svn_ps1() { | |
if [[ -d .svn ]]; then | |
local url=$(svn info | awk '/URL:/ {print $2}') | |
local repo=$(echo $url | sed 's/^.*\/\(trunk\|branches\|tags\)/\1/') | |
if $SVN_PS1_SHOWDIRTYSTATE; then | |
svn st | grep -e '^[MA]' > /dev/null 2>&1 | |
local modified=$(echo $? | sed 's/0/+/' | sed 's/1//') | |
svn st | grep '^?' > /dev/null 2>&1 | |
local added=$(echo $? | sed 's/0/*/' | sed 's/1//') | |
fi |