[zsh] Remove old header comments and sourcing .zshenv.local from .zshenv; add init_env_fpath()
This commit is contained in:
parent
4c145641c5
commit
c4dc2c71ae
1 changed files with 11 additions and 7 deletions
18
zshenv
18
zshenv
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue