Bash doesn't always read .bashrc

This commit is contained in:
Anthony Rose 2022-09-16 08:52:01 +01:00
parent f4fb45b114
commit 087e13bc5e

View file

@ -3,3 +3,17 @@ if [ -r "$HOME/.profile" ]
then
. "$HOME/.profile"
fi
case "$-" in
*i*)
# Shell is interactive.
if [ -r "$HOME/.bashrc" ]
then
. "$HOME/.bashrc"
fi
;;
*)
# Shell is not interactive.
return 1
;;
esac