From 008c964ebadffbf8a1137fae2237184f73806c2e Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Mon, 23 Jul 2018 12:41:36 +1200 Subject: [PATCH] refactor(zsh): update zshrc to account for system-wide omz install --- zsh/.zshrc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 8169610..0efa8cc 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,15 +1,26 @@ # add ~/bin & /usr/local/bin to $PATH export PATH=$HOME/bin:/usr/local/bin:$PATH -# location of oh-my-zsh installation -export ZSH=$HOME/.oh-my-zsh +# oh-my-zsh related directories +export ZSH=/usr/share/oh-my-zsh +export ZSH_CACHE_DIR=$XDG_CACHE_HOME/oh-my-zsh +export ZSH_CUSTOM=$XDG_CONFIG_HOME/oh-my-zsh/custom + +# create cache & plugin directories if they don't exist +if [[ ! -d $ZSH_CACHE_DIR ]]; then + mkdir -p $ZSH_CACHE_DIR +fi +# Custom plugins +if [[ ! -d $ZSH_CUSTOM ]]; then + mkdir -p $ZSH_CUSTOM + fi + +# disable automatic updates +DISABLE_AUTO_UPDATE=true # theme ZSH_THEME="ys" -# automatically update oh-my-zsh without being prompted -DISABLE_UPDATE_PROMPT=true - # plugins plugins=( common-aliases