1
0
Fork 0
mirror of synced 2024-06-16 22:01:09 -04:00
zimfw/login_init.zsh

46 lines
1.2 KiB
Bash
Raw Normal View History

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
#
(
local dir file zmodule zmodule_dir
setopt LOCAL_OPTIONS EXTENDED_GLOB
autoload -U zrecompile
# zcompile the completion cache; siginificant speedup
zrecompile -pq ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}
2015-12-15 00:12:17 -05:00
2016-01-04 18:11:30 -05:00
# zcompile .zshrc
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc
# zcompile enabled module autoloaded functions
for dir in ${ZIM_HOME}/modules/${^zmodules}/functions(/FN); do
zrecompile -pq ${dir}.zwc ${dir}/^([_.]*|prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N)
done
2018-04-05 13:58:59 -04:00
# zcompile enabled module init scripts and subdirs
setopt nullglob
for zmodule (${zmodules}); do
zmodule_dir=${ZIM_HOME}/modules/${zmodule}
if [[ -d ${zmodule_dir} ]]; then
2018-04-06 20:49:48 -04:00
for file (${zmodule_dir}/**/*.{zsh,sh,zsh-theme} \
${zmodule_dir}/*.{zsh,sh,zsh-theme}); do
if [[ -f ${file} ]]; then
zrecompile -pq ${file}
fi
done
fi
2016-01-04 18:11:30 -05:00
done
2018-04-05 13:58:59 -04:00
unsetopt nullglob
# zcompile all prompt setup scripts
for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
zrecompile -pq ${file}
done
2018-04-05 13:58:59 -04:00
) &!