Использование определённой версии zinit

This commit is contained in:
Andrei Astafev 2023-04-16 21:47:11 +03:00
parent 0d440310bd
commit ab88a647c0
2 changed files with 5 additions and 3 deletions

View File

@ -2,14 +2,16 @@
# vim: ft=sh
declare -A ZINIT
ZINIT[HOME_DIR]="$ZSH_CACHE_DIR/zinit"
ZINIT[VERSION]="3.10.0"
ZINIT[HOME_DIR]="$ZSH_CACHE_DIR/zinit-${ZINIT[VERSION]}"
ZINIT[PLUGINS_DIR]="$ZSH_CACHE_DIR/plugins"
ZINIT[SNIPPETS_DIR]="$ZSH_CACHE_DIR/snippets"
ZINIT[ZCOMPDUMP_PATH]="$ZSH_CACHE_DIR/zcompdump"
ZPFX="$ZSH_CACHE_DIR/polaris"
if [ ! -d "${ZINIT[HOME_DIR]}" ]; then
git clone --depth 1 https://github.com/zdharma-continuum/zinit "${ZINIT[HOME_DIR]}"
wget -q -O - "https://github.com/zdharma-continuum/zinit/archive/refs/tags/v${ZINIT[VERSION]}.tar.gz" | tar zxf - -C "$ZSH_CACHE_DIR"
sed -i 's/.*zinit-self-update -q//' "${ZINIT[HOME_DIR]}/zinit-autoload.zsh"
zcompile "${ZINIT[HOME_DIR]}/zinit.zsh"
fi

View File

@ -3,7 +3,7 @@
# Обновление конфигурации zsh, менеджера zinit и плагинов
zu() {
git -C "${ZDOTDIR}" pull && zinit update --parallel
zinit update --parallel --all
exec zsh
}