From 9937af9f49e82d2b6a7f188719943298643ff402 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 25 May 2022 14:06:52 -0700 Subject: [PATCH] [zsh] Convert the public init_env steps to do_init_functions --- zshenv | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/zshenv b/zshenv index 55a115a..4d3a24e 100644 --- a/zshenv +++ b/zshenv @@ -8,16 +8,20 @@ unsetopt GLOBAL_RCS export SYS=`uname -s | tr A-Z a-z` fpath=("$HOME/.zsh/func" $fpath) + autoload -Uz prepend_to_path autoload -Uz append_to_path -autoload -Uz init_env -autoload -Uz init_env_python -autoload -Uz init_path +autoload -Uz do_init_functions -init_path -init_env -init_env_python +typeset -a zsh_init_env_functions=( \ + init_env \ + init_env_python \ + init_path \ + init_env_$SYS \ +) -if autoload +X init_env_$SYS &>-; then - init_env_$SYS +do_init_functions zsh_init_env_functions + +if [[ -e "$HOME/.zshenv.local" ]]; then + source "$HOME/.zshenv.local" fi