Zsh: Change Antidote loading method

This commit is contained in:
the_4n0nym0u53 2022-03-12 18:06:34 +01:00
parent 9d785d2077
commit 5738bd9075
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB

View file

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