]> arthur.barton.de Git - ax-zsh.git/commitdiff
P10k: Read config after enabling instant prompt master
authorAlexander Barton <alex@barton.de>
Sun, 21 Apr 2024 20:13:09 +0000 (22:13 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 21 Apr 2024 20:13:09 +0000 (22:13 +0200)
This is how it is done in the official examples and enables instant
prompt even earlier, which is great!

ax.zsh

diff --git a/ax.zsh b/ax.zsh
index a0fb5d8b66e664e372a081ccfd2289df4d77cf6e..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"