dot-files/dot_zshrc

24 lines
566 B
Bash

if [[ -d "${XDG_CONFIG_HOME}/zsh/env.d" ]]; then
for file in "${XDG_CONFIG_HOME}"/zsh/env.d/*.env(N); do
eval "$(
grep -v '^\s*\#' "${file}" |
grep -v '^\s*$' |
sed 's/^\s*export//g' |
sed 's/^/export /g'
)"
done
unset file
fi
if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then
for file in "${XDG_CONFIG_HOME}"/zsh/zshrc.d/*.zsh(N); do
if [ -r "$file" ]; then
#shellcheck disable=1090
source "$file"
fi
done
unset file
fi
# vim: ft=zsh