2019-12-14 22:21:34 -05:00
|
|
|
() {
|
2021-11-21 14:29:33 -05:00
|
|
|
builtin emulate -L zsh
|
|
|
|
setopt EXTENDED_GLOB
|
2019-12-27 09:51:02 -05:00
|
|
|
autoload -Uz zrecompile
|
|
|
|
local zdumpfile zfile
|
2019-01-22 19:40:43 -05:00
|
|
|
|
|
|
|
# Compile the completion cache; significant speedup
|
2019-12-14 22:21:34 -05:00
|
|
|
zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=<%= home %>/.zcompdump
|
2019-01-22 19:40:43 -05:00
|
|
|
if [[ -f ${zdumpfile} ]]; then
|
|
|
|
zrecompile -p ${1} ${zdumpfile} || return 1
|
|
|
|
fi
|
|
|
|
|
2019-12-27 09:51:02 -05:00
|
|
|
# Compile Zsh startup files
|
2020-06-05 23:09:23 -04:00
|
|
|
for zfile in <%= home %>/<%= startup_files_glob %>(N-.); do
|
2019-12-27 09:51:02 -05:00
|
|
|
zrecompile -p ${1} ${zfile} || return 1
|
2019-01-22 19:40:43 -05:00
|
|
|
done
|
|
|
|
|
2019-12-27 09:51:02 -05:00
|
|
|
# Compile Zim scripts
|
2020-06-05 23:09:23 -04:00
|
|
|
for zfile in #{zscriptglob}; do
|
2019-01-22 19:40:43 -05:00
|
|
|
zrecompile -p ${1} ${zfile} || return 1
|
|
|
|
done
|
|
|
|
|
2020-06-05 23:09:23 -04:00
|
|
|
if [[ ${1} != -q ]] print -P '<%= done %>Done with compile.'
|
2019-12-14 22:21:34 -05:00
|
|
|
} "${@}"
|