mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Updates to style and svn plugin (correct branch display)
This commit is contained in:
parent
7f8217294c
commit
396755f044
6 changed files with 14 additions and 13 deletions
|
|
@ -13,19 +13,10 @@ function in_svn() {
|
|||
fi
|
||||
}
|
||||
|
||||
function svn_get_repo_name {
|
||||
if [ $(in_svn) ]; then
|
||||
svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
|
||||
|
||||
svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//"
|
||||
fi
|
||||
}
|
||||
|
||||
function svn_get_branch_name {
|
||||
if [ $(in_svn) ]; then
|
||||
svn info | sed -n 's/URL:\ .*\///p' | read SVN_URL
|
||||
|
||||
basename $SVN_URL
|
||||
svn info | grep '^URL:' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$' | read SVN_URL
|
||||
echo $SVN_URL
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue