mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 09:58:47 -07:00
perf: zrecompile
the compdump file to speed up startup (#8802)
This commit is contained in:
parent
6d48309cd7
commit
875a455320
@ -67,7 +67,7 @@ fi
|
|||||||
fpath=("$ZSH/functions" "$ZSH/completions" $fpath)
|
fpath=("$ZSH/functions" "$ZSH/completions" $fpath)
|
||||||
|
|
||||||
# Load all stock functions (from $fpath files) called below.
|
# Load all stock functions (from $fpath files) called below.
|
||||||
autoload -U compaudit compinit
|
autoload -U compaudit compinit zrecompile
|
||||||
|
|
||||||
# Set ZSH_CUSTOM to the path where your custom config files
|
# Set ZSH_CUSTOM to the path where your custom config files
|
||||||
# and plugins exists, or else we will use the default custom/
|
# and plugins exists, or else we will use the default custom/
|
||||||
@ -142,6 +142,9 @@ EOF
|
|||||||
fi
|
fi
|
||||||
unset zcompdump_revision zcompdump_fpath zcompdump_refresh
|
unset zcompdump_revision zcompdump_fpath zcompdump_refresh
|
||||||
|
|
||||||
|
# zcompile the completion dump file if the .zwc is older or missing.
|
||||||
|
zrecompile -q -p "$ZSH_COMPDUMP" && rm -f "$ZSH_COMPDUMP.zwc.old"
|
||||||
|
|
||||||
# Load all of the config files in ~/oh-my-zsh that end in .zsh
|
# Load all of the config files in ~/oh-my-zsh that end in .zsh
|
||||||
# TIP: Add files you don't want in git to .gitignore
|
# TIP: Add files you don't want in git to .gitignore
|
||||||
for config_file ("$ZSH"/lib/*.zsh); do
|
for config_file ("$ZSH"/lib/*.zsh); do
|
||||||
|
Loading…
Reference in New Issue
Block a user