1
0

zsh: cache tasks

This commit is contained in:
Konstantin Demin 2022-09-05 10:42:43 +03:00
parent 55324be58e
commit 3220c72f6f
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6

View File

@ -11,11 +11,21 @@ dotfiles-git() { (
zsh -i zsh -i
) } ) }
z-update() { z-zwc-gen() {
dotfiles-update local i
for i ( $(find "${ZSHU[d_conf]}/" -xdev -type f -name '*.zsh') ) ; do for i ( $(find "${ZSHU[d_conf]}/" -xdev -type f -name '*.zsh') ) ; do
zcompile -U "$i" zcompile -U "$i"
done ; unset i done
}
z-zwc-flush() {
find "${ZSHU[d_conf]}/" -xdev -type f -name '*.zwc' -delete
}
z-update() {
dotfiles-update
z-zwc-flush
z-zwc-gen
} }
z-reload() { z-reload() {
@ -26,5 +36,6 @@ z-reload() {
## reload or new session are required to regenerate compcache ## reload or new session are required to regenerate compcache
z-cache-flush() { z-cache-flush() {
find "${ZSHU[d_cache]}/" "${ZSHU[d_compcache]}/" -xdev -type f '!' -name '.keep' -delete find "${ZSHU[d_cache]}/" "${ZSHU[d_compcache]}/" -xdev -type f '!' -name '.keep' -delete
find "${ZSHU[d_conf]}/" -xdev -type f -name '*.zwc' -delete z-zwc-flush
z-zwc-gen
} }