zsh: moved zinit to .local/share

Maybe it should be moved to .cache?
This commit is contained in:
PowerUser64 2021-12-07 15:17:17 -08:00
parent 893549b2d1
commit 3a87b8a094

11
.zshrc
View file

@ -19,7 +19,7 @@
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
export ZINIT_HOME_DIR=""
export ZINIT_HOME_DIR="$HOME/.local/share/zinit"
WORKING_DIR_SAVE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/last-working-dir"
# make the dir for the file if needed
@ -503,16 +503,16 @@
# Load zinit >>>
{
# Install zinit if not installed
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
if [[ ! -f "$ZINIT_HOME_DIR/bin/zinit.zsh" ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
command mkdir -p "$ZINIT_HOME_DIR" && command chmod g-rwX "$ZINIT_HOME_DIR"
command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME_DIR/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
# Source zinit
source "$HOME/.zinit/bin/zinit.zsh"
source "$ZINIT_HOME_DIR/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
@ -536,7 +536,6 @@
# Quality of life
zinit load "zsh-users/zsh-autosuggestions"
zinit load "zdharma-continuum/fast-syntax-highlighting"
# zinit load "softmoth/zsh-vim-mode"
zinit load "jeffreytse/zsh-vi-mode"
zinit load "zsh-users/zsh-history-substring-search"
zinit load "zsh-users/zsh-completions"