Merge branch 'master' of https://github.com/LudovicRousseau/liquidprompt into develop
This commit is contained in:
commit
23f31f952e
10
liquidprompt
10
liquidprompt
@ -340,7 +340,11 @@ lcl)
|
||||
fi
|
||||
;;
|
||||
ssh)
|
||||
LP_HOST="${NO_COL}@${LP_COLOR_SSH}${_LP_HOST_SYMBOL}${NO_COL}"
|
||||
if [ -r /etc/debian_chroot ] ; then
|
||||
_LP_HOST_CHROOT=$(cat /etc/debian_chroot)
|
||||
_LP_HOST_CHROOT="($_LP_HOST_CHROOT)"
|
||||
fi
|
||||
LP_HOST="${NO_COL}@${LP_COLOR_SSH}${_LP_HOST_CHROOT}${_LP_HOST_SYMBOL}${NO_COL}"
|
||||
;;
|
||||
tel)
|
||||
LP_HOST="${NO_COL}@${LP_COLOR_TELNET}${_LP_HOST_SYMBOL}${NO_COL}"
|
||||
@ -666,13 +670,15 @@ _lp_svn_branch()
|
||||
[[ "$LP_ENABLE_SVN" != 1 ]] && return
|
||||
local root
|
||||
local url
|
||||
local result
|
||||
eval $(LANG=C LC_ALL=C svn info 2>/dev/null | sed -n 's/^URL: \(.*\)/url="\1"/p;s/^Repository Root: \(.*\)/root="\1"/p' )
|
||||
# Make url relative to root
|
||||
url="${url:${#root}}"
|
||||
if [[ "$url" == */trunk* ]] ; then
|
||||
echo trunk
|
||||
else
|
||||
expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root"
|
||||
result=$(expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")
|
||||
echo $result
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user