|
|
|
#!/usr/bin/env bash
|
|
|
|
# chezmoi:template:left-delimiter=#{{
|
|
|
|
#{{- /* vim: filetype=bash */}}
|
|
|
|
|
|
|
|
source "${HOME}/.profile"
|
|
|
|
|
|
|
|
# if not running interactively, don't do anything more
|
|
|
|
[ -z "$PS1" ] && return
|
|
|
|
|
|
|
|
#{{- if not (lookPath "starship") }}
|
|
|
|
if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
source "${XDG_CONFIG_HOME}/bash/prompt.sh"
|
|
|
|
fi
|
|
|
|
#{{- end }}
|
|
|
|
|
|
|
|
if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then
|
|
|
|
for file in "${XDG_CONFIG_HOME}"/bash/bashrc.d/*.sh; do
|
|
|
|
if [ -r "$file" ]; then
|
|
|
|
#shellcheck disable=1090
|
|
|
|
source "$file"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then
|
|
|
|
for file in "${XDG_CONFIG_HOME}"/bash/env.d/*.env; do
|
|
|
|
eval "$(
|
|
|
|
grep -v '^\s*\#' "${file}" |
|
|
|
|
grep -v '^\s*$' |
|
|
|
|
sed 's/^\s*export//g' |
|
|
|
|
sed 's/^/export /g'
|
|
|
|
)"
|
|
|
|
done
|
|
|
|
fi
|