update login logic
This commit is contained in:
parent
7292e4f0de
commit
c30703ac66
1 changed files with 24 additions and 19 deletions
|
@ -5,29 +5,34 @@
|
|||
# This includes zcompile, zcompdump, etc.
|
||||
#
|
||||
|
||||
zcompare() {
|
||||
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
|
||||
zcompile ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
(
|
||||
local dir file
|
||||
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||
autoload -U zrecompile
|
||||
local dir file
|
||||
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||
autoload -U zrecompile
|
||||
# zcompile the completion cache; siginificant speedup
|
||||
zcompare ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}
|
||||
|
||||
# zcompile the completion cache; siginificant speedup
|
||||
zrecompile -pq ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}
|
||||
# zcompile .zshrc
|
||||
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
||||
|
||||
# zcompile .zshrc
|
||||
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc
|
||||
|
||||
# zcompile enabled module autoloaded functions
|
||||
for dir in ${ZIM_HOME}/modules/${^zmodules}/functions(/FN); do
|
||||
# zcompile enabled module autoloaded functions
|
||||
for dir in ${ZIM_HOME}/modules/${^zmodules}/functions(/FN); do
|
||||
zrecompile -pq ${dir}.zwc ${dir}/^(_*|prompt_*_setup|*.*)(-.N)
|
||||
done
|
||||
done
|
||||
|
||||
# zcompile enabled module scripts
|
||||
for file in ${ZIM_HOME}/modules/${^zmodules}/(^*test*/)#*.zsh{,-theme}(.NLk+1); do
|
||||
zrecompile -pq ${file}
|
||||
done
|
||||
# zcompile enabled module scripts
|
||||
for file in ${ZIM_HOME}/modules/${^zmodules}/(^*test*/)#*.zsh{,-theme}(.NLk+1); do
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# zcompile all prompt setup scripts
|
||||
for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
|
||||
zrecompile -pq ${file}
|
||||
done
|
||||
# zcompile all prompt setup scripts
|
||||
for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
|
||||
zcompare ${file}
|
||||
done
|
||||
) &!
|
||||
|
|
Loading…
Reference in a new issue