From: sev Date: Mon, 16 Sep 2024 13:27:23 +0000 (-0500) Subject: zshenv: prefer _sev_home for fpath if ZDOTDIR unset X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/e71b6dc41aa02d657eff4439c7ce94c21f313f71?hp=c9bdb47979c7962871cf820640604d32e83ba88d zshenv: prefer _sev_home for fpath if ZDOTDIR unset --- diff --git a/etc/zsh/.zshenv b/etc/zsh/.zshenv index 1ec57d7..3c53c99 100644 --- a/etc/zsh/.zshenv +++ b/etc/zsh/.zshenv @@ -86,7 +86,7 @@ function _sev_setpath { # shift valid system paths to the front if there are any left ((len > 0 && len < $#path)) && path=("${(@)path[len + 1, -1]}" "${(@)path[1, len]}") # include our zsh dir in fpath. unlike above, we always prefer our paths - fpath=({${ZDOTDIR:-~/.zsh},{${_sev_home:-~},~}/.zsh}/functions/**/*(/N) "$fpath[@]") + fpath=({${ZDOTDIR:-{${_sev_home:-~},~}/.zsh},{${_sev_home:-~},~}/.zsh}/functions/**/*(/N) "$fpath[@]") # remove bad paths for (( i = 1; i <= $#fpath; i++ )) { if [[ ! -d $fpath[$i] ]] {