ZSH: Beginning of reconfiguring everything
This commit is contained in:
21
.config/zsh/autoload/zwcautocompile
Normal file
21
.config/zsh/autoload/zwcautocompile
Normal file
@ -0,0 +1,21 @@
|
||||
## Automatically compile all compilable files to zwc
|
||||
|
||||
function zwcautocompile () {
|
||||
autoload -Uz zrecompile
|
||||
|
||||
for zsh_file in $(find ${ZDOTDIR} -type f -maxdepth 3 \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user