diff --git a/sh/.zshrc b/sh/.zshrc index 577f8d6..53c04d9 100644 --- a/sh/.zshrc +++ b/sh/.zshrc @@ -1,8 +1,8 @@ -TOOLKIT=/etc/toolkit +source /etc/toolkit/sh/load.sh + ZSH=$TOOLKIT/sh/ohmyzsh ZSH_CUSTOM=$ZSH/custom ZSH_THEME="bira" -TOOLKIT=/etc/toolkit zstyle ':omz:update' mode auto # update automatically without asking zstyle ':omz:update' frequency 14 @@ -19,4 +19,3 @@ if [[ ! -d $ZSH_CACHE_DIR ]]; then fi source $ZSH/oh-my-zsh.sh -source $TOOLKIT/sh/load.sh diff --git a/sh/custom/aliases.sh b/sh/custom/aliases.sh index dc864bf..7a34b42 100644 --- a/sh/custom/aliases.sh +++ b/sh/custom/aliases.sh @@ -1,5 +1,5 @@ -ALIASES='/usr/share/zsh/custom/aliases.sh' -VARS='/usr/share/zsh/custom/vars.sh' +ALIASES=${TOOLKIT}/sh/custom/aliases.sh +VARS=${TOOLKIT}/sh/custom/vars.sh alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' diff --git a/sh/load.sh b/sh/load.sh index 94d842a..5fe2a4e 100644 --- a/sh/load.sh +++ b/sh/load.sh @@ -1,4 +1,6 @@ -# Sources necessary shell scripts -if [ -d "./custom" ]; then - source ./custom/*.sh -fi +TOOLKIT=/etc/toolkit + +# Sources custom shell scripts +for sh in ${TOOLKIT}/sh/custom/*.sh; do + test -r "$sh" && . "$sh" +done