From 73a804d05dfe55d8abef623827afce2f66944844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Schmidts?= Date: Thu, 10 Jan 2013 10:12:35 +0100 Subject: [PATCH] no systematic setting of PROMPT_DIRTRIM --- liquidprompt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/liquidprompt b/liquidprompt index ce1d480..c328ff0 100755 --- a/liquidprompt +++ b/liquidprompt @@ -492,10 +492,7 @@ _lp_shorten_path() _lp_get_dirtrim() { - if [[ "$LP_ENABLE_SHORTEN_PATH" != 1 ]]; then - [[ -n "$PROMPT_DIRTRIM" ]] && echo "$PROMPT_DIRTRIM" - return - fi + [[ "$LP_ENABLE_SHORTEN_PATH" != 1 ]] && echo 0 && return local tot [[ "$PWD" == *$HOME* ]] && tot="$((${#PWD}-${#HOME}+1))" || tot="${#PWD}" @@ -1020,7 +1017,7 @@ _lp_set_prompt() # LP_HOST is a global set at load time LP_PERM=$(_lp_permissions_color) LP_PWD=$(_lp_shorten_path) - PROMPT_DIRTRIM=$(_lp_get_dirtrim) + [[ -n "$PROMPT_DIRTRIM" ]] && PROMPT_DIRTRIM=$(_lp_get_dirtrim) LP_PROXY="${LP_COLOR_PROXY}$(_lp_proxy)${NO_COL}" # right of main prompt: space at left