Use print -P instead of echo for printing %~.

This commit is contained in:
Dustin Knie 2013-04-29 21:04:53 -07:00
parent f483697fda
commit 3773188b4f

View File

@ -545,9 +545,9 @@ _lp_shorten_path()
fi fi
elif [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then elif [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
if [[ "$len" -gt "$max_len" ]]; then if [[ "$len" -gt "$max_len" ]]; then
echo "%-${keep}~%${max_len}<${mask}<%~%<<" print -P "%-${keep}~%${max_len}<${mask}<%~%<<"
else else
echo "%~" print -P "%~"
fi fi
fi fi
} }