[zsh] Remove old header comments and sourcing .zshenv.local from .zshenv; add init_env_fpath()

This commit is contained in:
Eryn Wells 2023-03-27 10:37:08 -07:00
parent 4c145641c5
commit c4dc2c71ae

18
zshenv
View file

@ -1,5 +1,3 @@
# .zshenv
# vim: ft=zsh
# Eryn Wells <eryn@erynwells.me>
# 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