[zsh] Convert the public init_env steps to do_init_functions
This commit is contained in:
parent
f97f1bda34
commit
9937af9f49
1 changed files with 12 additions and 8 deletions
20
zshenv
20
zshenv
|
@ -8,16 +8,20 @@ unsetopt GLOBAL_RCS
|
||||||
export SYS=`uname -s | tr A-Z a-z`
|
export SYS=`uname -s | tr A-Z a-z`
|
||||||
|
|
||||||
fpath=("$HOME/.zsh/func" $fpath)
|
fpath=("$HOME/.zsh/func" $fpath)
|
||||||
|
|
||||||
autoload -Uz prepend_to_path
|
autoload -Uz prepend_to_path
|
||||||
autoload -Uz append_to_path
|
autoload -Uz append_to_path
|
||||||
autoload -Uz init_env
|
autoload -Uz do_init_functions
|
||||||
autoload -Uz init_env_python
|
|
||||||
autoload -Uz init_path
|
|
||||||
|
|
||||||
init_path
|
typeset -a zsh_init_env_functions=( \
|
||||||
init_env
|
init_env \
|
||||||
init_env_python
|
init_env_python \
|
||||||
|
init_path \
|
||||||
|
init_env_$SYS \
|
||||||
|
)
|
||||||
|
|
||||||
if autoload +X init_env_$SYS &>-; then
|
do_init_functions zsh_init_env_functions
|
||||||
init_env_$SYS
|
|
||||||
|
if [[ -e "$HOME/.zshenv.local" ]]; then
|
||||||
|
source "$HOME/.zshenv.local"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue