Fix bug in shorten_path for zsh

This commit is contained in:
Luc Didry 2012-08-12 10:51:29 +02:00
parent c8f01e68a3
commit fb5860bd26

View File

@ -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
}