Last Updated: February 25, 2016
·
387
· fpietka

Current branch name in the prompt with Subversion

To have a light version of __git_ps1 for subversion's repositories, here is a small function to add branch information to your prompt:

function __svn_ps1() {
    if [ -d ".svn" ]; then
        svn info | grep ^URL | awk -F"/" '{ print $NF }'
    fi
}