From 9ccde7971d28a0e794b88c3a24c6c1c799335021 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 00:49:33 -0700 Subject: [PATCH] zsh: fix instant prompt loading on first zinit install --- .zshrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index adeff6a..0bc99fc 100644 --- a/.zshrc +++ b/.zshrc @@ -17,6 +17,8 @@ ${SKIP_PLUGINS:-false} || { command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME_DIR/bin" && \ print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b\nPlease wait while plugins install." || \ print -P "%F{160}▓▒░ The clone has failed.%f%b" + elif [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi # Source zinit @@ -24,9 +26,6 @@ ${SKIP_PLUGINS:-false} || { autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit - if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" - fi # Load a few important annexes, without Turbo # (this is currently required for annexes) zinit light-mode for \