diff --git a/liquidprompt b/liquidprompt index bac8a7d..cb68d16 100755 --- a/liquidprompt +++ b/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 }