zsh: Remove double call of env scripts

On startup zsh would call all zsh env scripts (situated in `zsh/env`
or `zsh/env.d/*.zsh`) *and* all sh scripts (in `sh/env` or
`sh/env.d/*.sh`).
However, by that point, those scripts had already been sourced once - so
they just double up startup time.
This commit is contained in:
Marty Oehme 2023-02-09 09:39:21 +01:00
parent 0a137d1446
commit f08fa474d6
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -1,15 +1,6 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
# #
# load global sh env vars
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do
. "$_env"
done
unset _env
fi
# load zsh specific env vars # load zsh specific env vars
if [ -d "$XDG_CONFIG_HOME/zsh/env.d" ]; then if [ -d "$XDG_CONFIG_HOME/zsh/env.d" ]; then
for _env in "$XDG_CONFIG_HOME/zsh/env.d"/*.zsh; do for _env in "$XDG_CONFIG_HOME/zsh/env.d"/*.zsh; do