keeping liquidprompt from overriding PROMPT_DIRTRIM when path shortening is disabled

This commit is contained in:
François Schmidts 2013-12-15 02:04:06 +01:00 committed by Olivier Mengué
parent f3b34ed8cd
commit 7d2c1b0ce7

View File

@ -604,7 +604,7 @@ _lp_shorten_path()
# liquidprompt can calculate this number under two condition, path shortening # liquidprompt can calculate this number under two condition, path shortening
# must be activated and PROMPT_DIRTRIM must be already set. # must be activated and PROMPT_DIRTRIM must be already set.
_lp_get_dirtrim() { _lp_get_dirtrim() {
[[ "$LP_ENABLE_SHORTEN_PATH" != 1 ]] && echo 0 && return [[ "$LP_ENABLE_SHORTEN_PATH" != 1 ]] && echo $PROMPT_DIRTRIM && return
local p="${PWD/$HOME/~}" local p="${PWD/$HOME/~}"
local len=${#p} local len=${#p}