1
0
Fork 0
mirror of synced 2024-09-21 04:52:54 -04:00
zimfw/templates/.zlogin

59 lines
1.7 KiB
Text
Raw Normal View History

# .zlogin
2015-12-15 00:12:17 -05:00
#
# startup file read in interactive login shells
2015-12-15 00:12:17 -05:00
#
# The following code helps us by optimizing the existing framework.
# This includes zcompile, zcompdump, etc.
2015-12-15 00:12:17 -05:00
#
# # # old settings go here
(
# Function to determine the need of a zcompile. If the .zwc file
# does not exist, or the base file is newer, we need to compile.
# These jobs are asynchronous, and will not impact the interactive shell
zcompare() {
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
zcompile ${1};
fi;
}
2015-12-15 00:12:17 -05:00
ZIM_MODS=${ZDOTDIR:-${HOME}}/.zim/modules
2016-01-04 18:11:30 -05:00
setopt EXTENDED_GLOB
# zcompile the completion cache; siginificant speedup.
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
zcompare ${file};
done;
2015-12-15 00:12:17 -05:00
2016-01-04 18:11:30 -05:00
# zcompile .zshrc
2015-12-19 09:48:29 -05:00
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
2015-12-16 02:23:18 -05:00
2016-01-04 18:11:30 -05:00
# 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
zcompare ${ZIM_MODS}/fasd/init.zsh
2016-01-04 18:11:30 -05:00
# zcompile all .zsh files in the custom module
for file in ${ZIM_MODS}/custom/**/^(README.md|*.zwc)(.); do
zcompare ${file};
done;
2016-01-04 18:11:30 -05:00
# zcompile all autoloaded functions
for file in ${ZIM_MODS}/**/functions/^(*.zwc)(.); do
zcompare ${file};
done;
2016-01-04 18:11:30 -05:00
# 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
2016-01-04 18:11:30 -05:00
# zsh-histery-substring-search
zcompare ${ZIM_MODS}/history-substring-search/external/zsh-history-substring-search.zsh
) &!