#!/bin/sh

# Read first by zsh for EVERY shell (login or not), so this is the only place
# ZDOTDIR can be set early enough to redirect where zsh looks for its rc files.
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"

# Shared POSIX environment (idempotent):
for _name in path exports; do
	_file="$XDG_CONFIG_HOME/shell/$_name"
	[ -r "$_file" ] && . "$_file"
done
unset _name _file
