Avoid non-zero exit code at end of .bashrc

The previous syntax caused the last command to evaluate to a non-zero
exit code when .bashrc.local does not exist. This was annoying because
we show a non-zero exit code in the prompt, so the first prompt on every
bash session would show this exit code.
This commit is contained in:
Fernando Schauenburg 2019-02-18 22:51:13 +01:00
parent abfa79b015
commit 0a6ac8fca2

View file

@ -290,5 +290,9 @@ bashrc_customize_ls
[ -f ~/.config/shell/git-prompt.sh ] && . ~/.config/shell/git-prompt.sh
[ -f ~/.config/shell/git-completion.bash ] && . ~/.config/shell/git-completion.bash
[ -f ~/.bashrc.local ] && . ~/.bashrc.local
# Source a local bashrc if available
if [ -f "$HOME/.bashrc.local" ]; then
source "$HOME/.bashrc.local"
fi