Adjust template files after initial response
This will probably be merged with the earlier template commit.
This commit is contained in:
parent
603a6f79c7
commit
d11172d465
3 changed files with 32 additions and 30 deletions
|
@ -1,4 +1,4 @@
|
|||
# .zimrc
|
||||
|
||||
|
||||
#################
|
||||
# CORE SETTINGS #
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# .zlogin
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# startup file read in interactive login shells
|
||||
#
|
||||
|
@ -6,53 +8,53 @@
|
|||
# This includes zcompile, zcompdump, etc.
|
||||
#
|
||||
|
||||
# # # 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;
|
||||
zcompile ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
ZIM_MODS=${ZDOTDIR:-${HOME}}/.zim/modules
|
||||
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
# zcompile the completion cache; siginificant speedup.
|
||||
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
|
||||
zcompare ${file};
|
||||
done;
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# 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
|
||||
zcompare ${ZIM_MODS}/fasd/init.zsh
|
||||
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
|
||||
|
||||
# zcompile all .zsh files in the custom module
|
||||
for file in ${ZIM_MODS}/custom/**/^(README.md|*.zwc)(.); do
|
||||
zcompare ${file};
|
||||
done;
|
||||
for file in ${zim_mods}/custom/**/^(README.md|*.zwc)(.); do
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# zcompile all autoloaded functions
|
||||
for file in ${ZIM_MODS}/**/functions/^(*.zwc)(.); do
|
||||
zcompare ${file};
|
||||
done;
|
||||
for file in ${zim_mods}/**/functions/^(*.zwc)(.); 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
|
||||
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
|
||||
zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
|
||||
) &!
|
||||
|
||||
# # # personal configuration below this line # # #
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# .zshrc
|
||||
|
||||
# # # old settings go here # # #
|
||||
|
||||
# # # load Zim # # #
|
||||
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
|
||||
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh;
|
||||
fi;
|
||||
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
|
||||
fi
|
||||
|
||||
# # # personal configuration below this line # # #
|
||||
|
|
Loading…
Reference in a new issue