4 # startup file read in interactive login shells
6 # The following code helps us by optimizing the existing framework.
7 # This includes zcompile, zcompdump, etc.
11 # Function to determine the need of a zcompile. If the .zwc file
12 # does not exist, or the base file is newer, we need to compile.
13 # These jobs are asynchronous, and will not impact the interactive shell
15 if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
20 zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
23 # zcompile the completion cache; siginificant speedup.
24 for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
29 zcompare ${ZDOTDIR:-${HOME}}/.zshrc
31 # zcompile some light module init scripts
32 zcompare ${zim_mods}/git/init.zsh
33 zcompare ${zim_mods}/utility/init.zsh
34 zcompare ${zim_mods}/pacman/init.zsh
35 zcompare ${zim_mods}/spectrum/init.zsh
36 zcompare ${zim_mods}/completion/init.zsh
37 zcompare ${zim_mods}/fasd/init.zsh
39 # zcompile all .zsh files in the custom module
40 for file in ${zim_mods}/custom/**/^(README.md|*.zwc)(.); do
44 # zcompile all autoloaded functions
45 for file in ${zim_mods}/**/functions/^(*.zwc)(.); do
50 for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
53 zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
55 # zsh-histery-substring-search
56 zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh