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 source $zfile
done done
# Clone Antidote if necessary and generate a static plugin file # Clone Antidote if necessary
if [[ $ZDOTDIR/.zsh_plugins.zsh -ot $ZDOTDIR/.zsh_plugins.txt ]]; then [[ -e $ZDOTDIR/.antidote ]] || git clone https://github.com/mattmc3/antidote.git --depth=1 $ZDOTDIR/.antidote
[[ -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
# Load Antidote and plugins # Source Antidote
autoload -Uz $ZDOTDIR/.antidote/functions/antidote source $ZDOTDIR/.antidote/antidote.zsh
source $ZDOTDIR/.zsh_plugins.zsh
# Generate and source plugins from $ZDOTDIR/.zsh_plugins.txt
antidote load
# Set p10k prompt # Set p10k prompt
autoload -Uz promptinit && promptinit && prompt powerlevel10k autoload -Uz promptinit && promptinit && prompt powerlevel10k