dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

commit 1e926f91cfe63549911db87117a3396bc75fe653
parent e948f3d6e9d10592968ad407784c653031b88f9b
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Sat, 15 Jan 2022 05:57:38 -0800

Check for zinit, install if not there.

Diffstat:
M.config/zsh/.zshrc | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -198,7 +198,13 @@ setopt interactivecomments # Set up plugins and extensions. # Zinit. -source /usr/share/zinit/zinit.zsh 2>/dev/null +if type "pacman" &>/dev/null; then + source /usr/share/zinit/zinit.zsh 2>/dev/null +else + ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" + [ ! -d "$ZINIT_HOME" ] && mkdir -p "$(dirname $ZINIT_HOME)" && git clone 'git@github.com/zdharma-continuum/zinit.git' "$ZINIT_HOME" + source "${ZINIT_HOME}/zinit.zsh" +fi # If source zinit is under compload. autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit