diff --git a/.config/zsh/lib/completion.zsh b/.config/zsh/lib/completion.zsh index 8e69275..22870b3 100644 --- a/.config/zsh/lib/completion.zsh +++ b/.config/zsh/lib/completion.zsh @@ -10,7 +10,7 @@ __z_compdump_print() { printf '#zshu %s %s\n' "$1" "${(P)1}" ; } __z_compdump_invalidate() { command rm -f "${ZSHU[f_compdump]}" - find "${ZSHU[d_compcache]}/" -xdev -mindepth 1 -type f '!' -name '.keep' -delete + find "${ZSHU[d_compcache]}/" -xdev -type f '!' -name '.keep' -delete ZSHU[compdump_refresh]=1 } diff --git a/.config/zsh/lib/selfservice.zsh b/.config/zsh/lib/selfservice.zsh index fbe60e3..73063e8 100644 --- a/.config/zsh/lib/selfservice.zsh +++ b/.config/zsh/lib/selfservice.zsh @@ -13,6 +13,10 @@ dotfiles-git() { ( z-update() { dotfiles-update + for i ( $(find "${ZSHU[d_conf]}/" -xdev -type f -name '*.zsh') ) ; do + zcompile "$i" + done ; unset i + } z-reload() { @@ -22,5 +26,6 @@ z-reload() { ## reload or new session are required to regenerate compcache z-cache-flush() { - find "${ZSHU[d_cache]}/" -xdev -mindepth 1 -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 }