From fb5860bd26dd6c212ba39a8f4cae371fffc32d36 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 12 Aug 2012 10:51:29 +0200 Subject: [PATCH] Fix bug in shorten_path for zsh --- liquidprompt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/liquidprompt b/liquidprompt index f04874f..96318d2 100755 --- a/liquidprompt +++ b/liquidprompt @@ -408,7 +408,11 @@ __shorten_path() echo "$p" fi elif [[ "$WORKING_SHELL" == "zsh" ]]; then - echo "%-${keep}~%${max_len}<${mask}<%~%<<" + if [[ "$len" -gt "$max_len" ]]; then + echo "%-${keep}~%${max_len}<${mask}<%~%<<" + else + echo "%~" + fi fi }