1
0
Fork 0

Speeds up completion startup

Before this change, completion startup would rebuild ~/.zcompdump each
time a new shell was created.

After this change, completion startup will only rebuild ~/.zcompdump once per
day.

This dramatically speeds up the startup time for Prezto for all but the
first startup of the day.
pull/1210/head
Sam Jones 8 years ago
parent 4f19700919
commit e7e0fb914a
No known key found for this signature in database
GPG Key ID: C8E6D044FBE9D9EB

@ -15,7 +15,15 @@ fi
fpath=("${0:h}/external/src" $fpath)
# Load and initialize the completion system ignoring insecure directories.
autoload -Uz compinit && compinit -i
# Will only rebuild ~/.zcompdump once per day
autoload -Uz compinit
if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then
compinit
else
compinit -C
fi
#
# Options

Loading…
Cancel
Save