From 397a2f9ac8a9e8f9b17c571cef33077ec8c1ced0 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 20 Oct 2021 08:37:38 -0500 Subject: [PATCH] Simplify fpath workaround Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- dot_zshenv.tmpl | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/dot_zshenv.tmpl b/dot_zshenv.tmpl index 8efe7b4..2a79f32 100644 --- a/dot_zshenv.tmpl +++ b/dot_zshenv.tmpl @@ -1,18 +1,9 @@ -# shellcheck shell=zsh +# shellcheck shell=bash -{{- if (eq .cluster "scinet") -}} +{{ if (or (eq .chezmoi.hostname "Atlas-login-1") (eq .chezmoi.hostname "Atlas-login-2")) -}} # 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 -}} +fpath+=($HOME/.local/share/zsh/5.8/functions) +{{- end }} # Linuxbrew setup if [ -d $HOME/../linuxbrew/.linuxbrew ]; then