From 5738bd9075e60059f670db0d1c8630baa7c489af Mon Sep 17 00:00:00 2001 From: the_4n0nym0u53 Date: Sat, 12 Mar 2022 18:06:34 +0100 Subject: [PATCH] Zsh: Change Antidote loading method --- zsh/.config/zsh/.zshrc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 37f39ae..e7adb75 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -11,19 +11,14 @@ for zfile in $ZDOTDIR/*.zsh; do source $zfile done -# Clone Antidote if necessary and generate a static plugin file -if [[ $ZDOTDIR/.zsh_plugins.zsh -ot $ZDOTDIR/.zsh_plugins.txt ]]; then - [[ -e $ZDOTDIR/.antidote ]] || git clone --depth=1 https://github.com/mattmc3/antidote.git $ZDOTDIR/.antidote - [[ -e $ZDOTDIR/.zsh_plugins.txt ]] || touch $ZDOTDIR/.zsh_plugins.txt - ( - source $ZDOTDIR/.antidote/antidote.zsh - antidote bundle <$ZDOTDIR/.zsh_plugins.txt >$ZDOTDIR/.zsh_plugins.zsh - ) -fi +# Clone Antidote if necessary +[[ -e $ZDOTDIR/.antidote ]] || git clone https://github.com/mattmc3/antidote.git --depth=1 $ZDOTDIR/.antidote -# Load Antidote and plugins -autoload -Uz $ZDOTDIR/.antidote/functions/antidote -source $ZDOTDIR/.zsh_plugins.zsh +# Source Antidote +source $ZDOTDIR/.antidote/antidote.zsh + +# Generate and source plugins from $ZDOTDIR/.zsh_plugins.txt +antidote load # Set p10k prompt autoload -Uz promptinit && promptinit && prompt powerlevel10k