]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
iterm2: Respect ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX variable in tmux
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index ec11a3b31163c979f43e12fc71941ed051ab3853..a0fb5d8b66e664e372a081ccfd2289df4d77cf6e 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -32,7 +32,11 @@ function axzsh_handle_stage {
                ( ! -o login && "$type" == "zshrc" && -n "$AXZSH_ZPROFILE_READ" ) \
        ]]; then
                p10k_instant_prompt="${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
-               [[ -r "$p10k_instant_prompt" ]] && source "$p10k_instant_prompt"
+               if [[ -r "$p10k_instant_prompt" ]]; then
+                       [[ -n "$AXZSH_DEBUG" ]] && echo "  Reading \"$p10k_instant_prompt\" ..."
+                       source "$p10k_instant_prompt"
+               fi
+               unset p10k_instant_prompt
        fi
 
        # Initialize cache
@@ -53,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"