[bash] read .local/bashrc if available

This commit is contained in:
Eric Teunis de Boone 2022-02-10 20:11:12 +01:00
parent 6b0d6af2f8
commit ce9fc9d752
1 changed files with 7 additions and 5 deletions

View File

@ -33,8 +33,8 @@ fi
if [ -d "$DOTBASH/bashrc.d" ]; then
for f in colours.bash aliases.bash history.bash prompt_command.bash password-store.bash network.bash
do
if [ -r "$DOTBASH/bash.d/$f" ]; then
source "$DOTBASH/bash.d/$f"
if [ -r "$DOTBASH/bashrc.d/$f" ]; then
source "$DOTBASH/bashrc.d/$f"
fi
done
fi
@ -44,6 +44,8 @@ if [ -r "$DOTBASH/$HOSTNAME.bashrc" ]; then
source "$DOTBASH/$HOSTNAME.bashrc"
fi
if [ -r "$HOME/.bashrc.local" ]; then
source "$HOME/.bashrc.local"
fi
# Always source a local bashrc
[ -r "$HOME/.bashrc.local" ] && source "$HOME/.bashrc.local"
# Also check in .local for a bashrc
[ -r "$HOME/.local/bashrc" ] && source "$HOME/.local/bashrc"