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.
This commit is contained in:
parent
4f19700919
commit
e7e0fb914a
1 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue