Fix: must check for existence of .zcompdump.zwc before comparing times

This commit is contained in:
huyz 2012-12-11 21:39:35 -08:00
parent 4215a0fa44
commit 036407ce8f

View file

@ -9,7 +9,7 @@
{
# Compile the completion dump to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -e "$zcompdump" && ("$zcompdump" -nt "${zcompdump}.zwc" || ! -s "${zcompdump}.zwc") ]];
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi