From: Alexander Barton Date: Mon, 22 Mar 2021 21:21:29 +0000 (+0100) Subject: axzshctl: Delete ZSH cache folder on "update-caches", too X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=d26d8e7f881e94f7546e515d23a12ff456af48c7 axzshctl: Delete ZSH cache folder on "update-caches", too --- diff --git a/bin/axzshctl b/bin/axzshctl index 30f0952..51c82cc 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -69,7 +69,14 @@ function Usage { function UpdatePluginCache { [[ -r "$AXZSH/cache" ]] || return 0 - [[ "$1" = "-v" ]] && ax_msg - "Updating plugin cache ..." + [[ "$1" = "-v" ]] && ax_msg - "Invalidating & updating caches ..." + + if [[ -d "$ZSH_CACHE_DIR" ]]; then + echo "Removing ZSH cache folder ..." + rm -fr "$ZSH_CACHE_DIR" + fi + + echo "Removing AX-ZSH cache files ..." rm -rf \ $AXZSH/cache/ax-io.cache \ $AXZSH/cache/zlogin.cache \ @@ -77,7 +84,8 @@ function UpdatePluginCache { $AXZSH/cache/zprofile.cache \ $AXZSH/cache/zshrc.cache \ || return 1 - echo "Regenerating cache files ..." + + echo "Regenerating AX-ZSH cache ..." AXZSH_PLUGIN_CHECK=1 zsh -ilc '' >/dev/null }