2024-10-28 12:31:50 +01:00
|
|
|
## Automatically compile all compilable files to zwc
|
|
|
|
|
|
|
|
function zwcautocompile () {
|
|
|
|
autoload -Uz zrecompile
|
|
|
|
|
2024-10-28 15:02:52 +01:00
|
|
|
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
2024-10-28 12:31:50 +01:00
|
|
|
zrecompile -pq $zsh_file && rm -f $zsh_file.zwc.old
|
|
|
|
done
|
|
|
|
|
|
|
|
if [[ -d ${ZAUTOLOADDIR} ]]; then
|
|
|
|
for f in ${ZAUTOLOADDIR}/*; do
|
|
|
|
zrecompile -pq $f && rm -f $f.zwc.old
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -d ${ZLIBDIR} ]]; then
|
|
|
|
for f in ${ZLIBDIR}/*; do
|
|
|
|
zrecompile -pq $f && rm -f $f.zwc.old
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|