don't process VCS function if root

they do not appear in the result anyway, and they can be quite slow
This commit is contained in:
Christophe Drevet 2013-01-04 12:08:06 +01:00
parent 1bf7fd93a5
commit d6c5f3ca0f

View File

@ -1000,9 +1000,11 @@ _lp_set_prompt()
# right of main prompt: space at left # right of main prompt: space at left
LP_VENV=$(_lp_sl "$(_lp_virtualenv)") LP_VENV=$(_lp_sl "$(_lp_virtualenv)")
LP_GIT=$(_lp_sl "$(_lp_git_branch_color)") if [[ "$EUID" -ne "0" ]] ; then
LP_HG=$(_lp_sl "$(_lp_hg_branch_color)") LP_GIT=$(_lp_sl "$(_lp_git_branch_color)")
LP_SVN=$(_lp_sl "$(_lp_svn_branch_color)") LP_HG=$(_lp_sl "$(_lp_hg_branch_color)")
LP_SVN=$(_lp_sl "$(_lp_svn_branch_color)")
fi
# end of the prompt line: double spaces # end of the prompt line: double spaces
LP_MARK=$(_lp_sb "$(_lp_smart_mark)") LP_MARK=$(_lp_sb "$(_lp_smart_mark)")