28 lines
985 B
Bash
28 lines
985 B
Bash
# shellcheck shell=bash
|
|
# vim: ft=sh
|
|
|
|
declare -A 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
|
|
curl -sL "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
|
|
|
|
source "${ZINIT[HOME_DIR]}/zinit.zsh"
|
|
autoload -Uz _zinit
|
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
|
|
|
# Расширение zinit для загрузки файлов
|
|
zinit light zdharma-continuum/z-a-patch-dl
|
|
|
|
# Расширение zinit для запуска программ и скриптов, расположенных вне $PATH
|
|
zinit light zdharma-continuum/z-a-bin-gem-node
|
|
|