]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
Correctly test XDG_CACHE_HOME for writability for "stamp files"
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index f2100399895d245465a58addbaa232e4590ce198..05f20021a7e60af4bfca676b3e0d666531b0a9d2 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -17,8 +17,6 @@ function axzsh_handle_stage {
        # Look for some 3rd-party integrations ...
 
        # --- Powerlevel10k ---
-       # Read in Powerlevel10k configuration file, if not already read:
-       [[ -z "$POWERLEVEL9K_CONFIG_FILE" && -r ~/.p10k.zsh ]] && source ~/.p10k.zsh
        # Enable instant prompt. Should stay close to the top of ~/.zshrc.
        # Initialization code that may require console input (password prompts,
        # [y/n] confirmations, etc.) must be executed before this, so all ax-zsh
@@ -38,6 +36,8 @@ function axzsh_handle_stage {
                fi
                unset p10k_instant_prompt
        fi
+       # Read in Powerlevel10k configuration file, if not already read:
+       [[ -z "$POWERLEVEL9K_CONFIG_FILE" && -r ~/.p10k.zsh ]] && source ~/.p10k.zsh
 
        # Initialize cache
        [[ -d "$AXZSH/cache" ]] || mkdir -p "$AXZSH/cache"
@@ -57,7 +57,7 @@ function axzsh_handle_stage {
                [[ -n "$AXZSH_DEBUG" ]] \
                        && echo "   - Reading cache file \"$cache_file\" ..."
                source "$cache_file"
-               unfunction axzsh_plugin_init
+               (( $+functions[axzsh_plugin_init] )) && unfunction axzsh_plugin_init
        else
                # No cache file available.
                local new_cache_file="$cache_file.NEW"