Rework sourcing of .bashrc
This commit is contained in:
16
.profile
16
.profile
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user