2022-12-18 15:58:00 +00:00
|
|
|
# shellcheck shell=bash
|
|
|
|
# vim: ft=sh
|
|
|
|
|
2022-12-17 16:17:36 +00:00
|
|
|
declare -A ZINIT
|
2023-04-16 18:47:11 +00:00
|
|
|
ZINIT[VERSION]="3.10.0"
|
|
|
|
ZINIT[HOME_DIR]="$ZSH_CACHE_DIR/zinit-${ZINIT[VERSION]}"
|
2022-12-17 16:17:36 +00:00
|
|
|
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"
|
|
|
|
|
2022-12-19 03:46:56 +00:00
|
|
|
if [ ! -d "${ZINIT[HOME_DIR]}" ]; then
|
2023-04-17 10:17:02 +00:00
|
|
|
curl -sL "https://github.com/zdharma-continuum/zinit/archive/refs/tags/v${ZINIT[VERSION]}.tar.gz" | tar zxf - -C "$ZSH_CACHE_DIR"
|
2023-04-16 18:47:11 +00:00
|
|
|
sed -i 's/.*zinit-self-update -q//' "${ZINIT[HOME_DIR]}/zinit-autoload.zsh"
|
2022-12-19 03:46:56 +00:00
|
|
|
zcompile "${ZINIT[HOME_DIR]}/zinit.zsh"
|
2022-12-17 16:17:36 +00:00
|
|
|
fi
|
|
|
|
|
2022-12-19 03:46:56 +00:00
|
|
|
source "${ZINIT[HOME_DIR]}/zinit.zsh"
|
2022-12-17 16:17:36 +00:00
|
|
|
autoload -Uz _zinit
|
|
|
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
|
|
|
|
2022-12-18 08:51:02 +00:00
|
|
|
# Расширение zinit для загрузки файлов
|
|
|
|
zinit light zdharma-continuum/z-a-patch-dl
|
|
|
|
|
|
|
|
# Расширение zinit для запуска программ и скриптов, расположенных вне $PATH
|
|
|
|
zinit light zdharma-continuum/z-a-bin-gem-node
|
|
|
|
|