Rework sourcing of .bashrc

This commit is contained in:
2026-01-12 15:18:06 +01:00
parent 327dc0f673
commit 2429955bc0

View File

@@ -43,11 +43,11 @@ export GCC_COLORS=auto
ssh-add "$HOME/.ssh/admin@homeserver" >/dev/null 2>&1 ssh-add "$HOME/.ssh/admin@homeserver" >/dev/null 2>&1
} }
# if executing interactively #shellcheck disable=SC1091
# execute .bashrc in the current login context # Source ~/.bashrc, when in interactive mode, but not POSIX/sh mode.
case $- in [ "$BASH" ] &&
*i*) ;; [ "$PS1" ] &&
*) return ;; [ -z "$POSIXLY_CORRECT" ] &&
esac [ "${0#-}" != 'sh' ] &&
[ -z "${PS1-}" ] && return [ -r "$HOME/.bashrc" ] &&
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" . "$HOME/.bashrc"