]> arthur.barton.de Git - ax-zsh.git/commitdiff
axzshctl: Delete ZSH cache folder on "update-caches", too
authorAlexander Barton <alex@barton.de>
Mon, 22 Mar 2021 21:21:29 +0000 (22:21 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 22 Mar 2021 21:23:24 +0000 (22:23 +0100)
bin/axzshctl

index 30f0952a4ba8efb151b8e01d0a5684dcb657cc4a..51c82cca0ea2965dbe31d5fe9a3306ca054b0e3a 100755 (executable)
@@ -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
 }