diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 1658946..b78b6e3 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -23,13 +23,8 @@ source ${0:h}/compdefs.zsh { # zcomple the .zcompdump in the background - zcompdump=${ZDOTDIR:-${HOME}}/.zcompdump - - if [[ -s ${zcompdump} && ( ! -s ${zcompdump}.zwc || ${zcompdump} -nt ${zcompdump}.zwc) ]]; then - zcompile ${zcompdump} - fi - - unset zcompdump + autoload -U zrecompile + zrecompile -pq ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump} } &! diff --git a/modules/meta/functions/zmanage b/modules/meta/functions/zmanage index afb4320..075950c 100644 --- a/modules/meta/functions/zmanage +++ b/modules/meta/functions/zmanage @@ -25,7 +25,7 @@ case ${1} in ;; issue) zsh ${tools}/zim_issue ;; - clean-cache) zsh ${tools}/zim_clean_cache && print 'Cleaned cache' + clean-cache) source ${tools}/zim_clean_cache && print 'Cleaned cache' ;; build-cache) source ${tools}/zim_build_cache && print 'Rebuilt cache' ;; diff --git a/tools/zim_clean_cache b/tools/zim_clean_cache index dd3ea7c..9375550 100644 --- a/tools/zim_clean_cache +++ b/tools/zim_clean_cache @@ -2,7 +2,8 @@ # zim_clean_cache - removes all zcompiled files # -find ${ZIM_HOME} -iname '*.zwc' | xargs rm -rm -f ${ZDOTDIR:-${HOME}}/.{zshrc.zwc,zcompdump,zcompdump.zwc} +find ${ZIM_HOME} -iname '*.zwc' -delete +rm -f ${ZDOTDIR:-${HOME}}/.zshrc.zwc +rm -f ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}{,.zwc} print 'To rebuild the completion cache, please restart your terminal'