Skip to content

Commit

Permalink
SVN: Support for paths that are not branches or trunk
Browse files Browse the repository at this point in the history
Also fallback to displaying the repo's root name in the case where the
repo path is none of tags/branches/trunk
  • Loading branch information
brettmc authored and dolmen committed Apr 5, 2014
1 parent e927985 commit 5425a5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion liquidprompt
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,12 @@ _lp_svn_branch()
url="${url:${#root}}"
if [[ "$url" == */trunk* ]] ; then
echo -n trunk
else
elif [[ "$url" == */branches* ]] ; then
_lp_escape "$(expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")"
elif [[ "$url" == */tags* ]] ; then
_lp_escape "$(expr "$url" : '.*/tags/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")"
else
_lp_escape "$(basename "$root")"
fi
}

Expand Down

0 comments on commit 5425a5e

Please sign in to comment.