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