From 219c25e0f0b4f7a36a51b97b4ed220bb35fc5c3c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 20 Oct 2021 08:27:30 -0500 Subject: [PATCH] Add in workaround for fpath Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- dot_zshenv.tmpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dot_zshenv.tmpl b/dot_zshenv.tmpl index 08c5694..8efe7b4 100644 --- a/dot_zshenv.tmpl +++ b/dot_zshenv.tmpl @@ -1,4 +1,19 @@ # shellcheck shell=zsh + +{{- if (eq .cluster "scinet") -}} +# Workaround for SCINet admins clobbering fpath +ZEXECDIR=$(dirname $(command -v zsh)) +if [ -d $ZEXECDIR/../share/zsh/functions ]; then + fpath+=$(realpath $ZEXECDIR/../share/zsh/functions) +else + for ZSHAREDIR in $ZEXECDIR/../share/zsh/*; do + if [ -d $ZSHAREDIR/functions ]; then + fpath+=$(realpath $ZSHAREDIR/functions) + fi + done +fi +{{- end -}} + # Linuxbrew setup if [ -d $HOME/../linuxbrew/.linuxbrew ]; then BREWPATH=$HOME/../linuxbrew/.linuxbrew