From c4dc2c71ae8d32e54b17dc876757e56e603400f2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 27 Mar 2023 10:37:08 -0700 Subject: [PATCH] [zsh] Remove old header comments and sourcing .zshenv.local from .zshenv; add init_env_fpath() --- zshenv | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/zshenv b/zshenv index 825d528..75fb4dc 100644 --- a/zshenv +++ b/zshenv @@ -1,5 +1,3 @@ -# .zshenv -# vim: ft=zsh # Eryn Wells # Don't read global startup. It messes things up... @@ -7,7 +5,17 @@ unsetopt GLOBAL_RCS export SYS=`uname -s | tr A-Z a-z` -fpath=("$HOME/.zsh/func" $fpath) +init_env_fpath() { + local USER_FPATH=( "$HOME/.zsh/func" ) + + if [[ "$SYS" == "darwin" ]]; then + USER_FPATH=($USER_FPATH "$HOME/.zsh/func/darwin") + fi + + fpath=($USER_FPATH $fpath) +} + +init_env_fpath autoload -Uz do_init_functions @@ -22,7 +30,3 @@ typeset -a zsh_init_env_functions=( \ ) do_init_functions zsh_init_env_functions - -if [[ -e "$HOME/.zshenv.local" ]]; then - source "$HOME/.zshenv.local" -fi