From d6c5f3ca0feae4b734df62033e138defe0776cd7 Mon Sep 17 00:00:00 2001 From: Christophe Drevet Date: Fri, 4 Jan 2013 12:08:06 +0100 Subject: [PATCH] don't process VCS function if root they do not appear in the result anyway, and they can be quite slow --- liquidprompt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/liquidprompt b/liquidprompt index 4874551..e263485 100755 --- a/liquidprompt +++ b/liquidprompt @@ -1000,9 +1000,11 @@ _lp_set_prompt() # right of main prompt: space at left LP_VENV=$(_lp_sl "$(_lp_virtualenv)") - LP_GIT=$(_lp_sl "$(_lp_git_branch_color)") - LP_HG=$(_lp_sl "$(_lp_hg_branch_color)") - LP_SVN=$(_lp_sl "$(_lp_svn_branch_color)") + if [[ "$EUID" -ne "0" ]] ; then + LP_GIT=$(_lp_sl "$(_lp_git_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 LP_MARK=$(_lp_sb "$(_lp_smart_mark)")