#!/bin/sh

# Shared interactive shell config. Sourced by both zsh ($ZDOTDIR/.zshrc) and
# bash (~/.config/bash/rc). Only ever loaded by zsh/bash, so brace expansion is
# fine here (unlike the POSIX `profile`).
for _file in "${XDG_CONFIG_HOME:-$HOME/.config}"/shell/{aliases,functions,extra}; do
	[ -r "$_file" ] && . "$_file"
done
unset _file

# Ensure the history dir exists; neither shell mkdir's it, so without this
# $HISTFILE writes fail silently on a fresh host.
[ -n "$HISTFILE" ] && mkdir -p "$(dirname "$HISTFILE")"

# pyenv interactive shims (pyenv init - autodetects the running shell):
command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init -)"
