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