cleanup zlogin

This commit is contained in:
Matt Hamilton 2016-01-04 18:11:30 -05:00
parent 251437fd03
commit bf10ce72c5
1 changed files with 26 additions and 35 deletions

View File

@ -15,44 +15,35 @@
fi
}
# First, we will zcompile the completion cache, if it exists. Siginificant speedup.
zcompare ${ZDOTDIR:-${HOME}}/.zcompdump
# Next, zcompile .zshrc if needed
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
# Now, zcompile some light module init scripts
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/git/init.zsh
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/utility/init.zsh
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/pacman/init.zsh
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/spectrum/init.zsh
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/completion/init.zsh
zcompare ${ZDOTDIR:-${HOME}}/.zim/modules/custom/init.zsh
# Then, we should zcompile the 'heavy' modules where possible.
# This includes syntax-highlighting and completion.
# Other modules may be added to this list at a later date.
zim=${ZDOTDIR:-${HOME}}/.zim
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
setopt EXTENDED_GLOB
#
# syntax-highlighting zcompile
#
if [[ -d ${zim}/modules/syntax-highlighting/external/highlighters ]]; then
# compile the highlighters
for file in ${zim}/modules/syntax-highlighting/external/highlighters/**/*.zsh; do
zcompare ${file}
done
# compile the main file
zcompare ${zim}/modules/syntax-highlighting/external/zsh-syntax-highlighting.zsh
fi
# zcompile the completion cache; siginificant speedup.
zcompare ${ZDOTDIR:-${HOME}}/.zcompdump
#
# zsh-histery-substring-search zcompile
#
if [[ -s ${zim}/modules/history-substring-search/external/zsh-history-substring-search.zsh ]]; then
zcompare ${zim}/modules/history-substring-search/external/zsh-history-substring-search.zsh
fi
# zcompile .zshrc
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
# zcompile some light module init scripts
zcompare ${zim_mods}/git/init.zsh
zcompare ${zim_mods}/utility/init.zsh
zcompare ${zim_mods}/pacman/init.zsh
zcompare ${zim_mods}/spectrum/init.zsh
zcompare ${zim_mods}/completion/init.zsh
# zcompile all .zsh files in the custom module
for file in ${zim_mods}/custom/**/*.zsh; do
zcompare ${file}
done
# syntax-highlighting
for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
zcompare ${file}
done
zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
# zsh-histery-substring-search
zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
) &!