diff --git a/liquidprompt b/liquidprompt index 2c485d5..e76d12b 100755 --- a/liquidprompt +++ b/liquidprompt @@ -568,7 +568,7 @@ _lp_shorten_path() p="${p:0:${#p} - ${#base}}" - ret="${ret%/}" # strip trailing slash + [[ ${ret} != "/" ]] && ret="${ret%/}" # strip trailing slash local -i len_left=$(( ${max_len} - ${#ret} - ${#base} - ${#mask} ))