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
}
Written by François Pietka
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#