From 16cde0d3d6fed87b3f580db6982c337f0ad62fdc Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Wed, 3 Jul 2024 08:24:46 +0200 Subject: [PATCH] Check if `omz` is available first --- .config/zsh/.zshrc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index cf8359c..754dc77 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -66,20 +66,23 @@ setopt INC_APPEND_HISTORY # Initialize oh-my-zsh's plugins -plugins=( - command-not-found - dirhistory - dotenv # config in ~/.zshenv; `_update_repositories` temporarily disables this - git-escape-magic - invoke # completions for invoke - jsontools - pip # completions for pip - poetry # completions for poetry - z -) +if [ -r "$ZSH/oh-my-zsh.sh" ]; then -source "$ZSH/oh-my-zsh.sh" + plugins=( + command-not-found + dirhistory + dotenv # config in ~/.zshenv; `_update_repositories` temporarily disables this + git-escape-magic + invoke # completions for invoke + jsontools + pip # completions for pip + poetry # completions for poetry + z + ) + source "$ZSH/oh-my-zsh.sh" + +fi # Initialize zplug's plugins