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 }