zsh: fix instant prompt loading on first zinit install

This commit is contained in:
PowerUser64 2022-06-22 00:49:33 -07:00
parent 0db510dc09
commit 9ccde7971d

5
.zshrc
View file

@ -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 \