]> arthur.barton.de Git - ax-zsh.git/commitdiff
Move 3rd-party integration into axzsh_handle_stage()
authorAlexander Barton <alex@barton.de>
Sat, 26 Dec 2020 19:55:20 +0000 (20:55 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 26 Dec 2020 19:55:20 +0000 (20:55 +0100)
ax.zsh

diff --git a/ax.zsh b/ax.zsh
index 909c42fd752451e1b5af766a41edd94fa1880acf..b0b1d733b4d6ddc858425a2a10602538e50ed8c8 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -14,6 +14,20 @@ function axzsh_handle_stage {
 
        [[ -n "$AXZSH_DEBUG" ]] && echo "ยป $name ($type):"
 
+       # 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
+       # plugings should do output in their "zprofile" stage!
+       if [[ "$type" == "zprofile" ]]; then
+               p10k_instant_prompt="${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
+               [[ -r "$p10k_instant_prompt" ]] && source "$p10k_instant_prompt"
+       fi
+
        # Initialize cache
        mkdir -p "$AXZSH/cache"
        cache_file="$AXZSH/cache/$type.cache"
@@ -208,20 +222,6 @@ if [[ "$script_type" = "zprofile" ]]; then
        axzsh_handle_stage "$script_name" "ax-io"
 fi
 
-# 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
-# plugings should do output in their "zprofile" stage!
-if [[ "$script_type" == "zprofile" ]]; then
-       p10k_instant_prompt="${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
-       [[ -r "$p10k_instant_prompt" ]] && source "$p10k_instant_prompt"
-fi
-
 axzsh_handle_stage "$script_name" "$script_type"
 
 # Clean up ...