1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00
dotfiles/zsh/.zshenv
Joe Groocock f4b03038ee
zsh: zshenv source all environment in a loop
source only accepts one argument, so it must be called once for each
environment file.

Signed-off-by: Joe Groocock <me@frebib.net>
2020-08-23 17:04:05 +01:00

12 lines
375 B
Bash

# Assume environment is already loaded if ZDOTDIR is set.
# This speeds up starting zsh if it's not required. Attempt
# to load the environment if it's absent, though, in case
# ZDOTDIR is overriden and .zshrc is not in ~
if [ -z "$ZDOTDIR" ]; then
set -o allexport
for f in "$HOME"/.config/environment.d/*.conf; do . "$f"; done
set +o allexport
fi
# vim: ft=sh