dotfiles/dot_config/bash/bash-setup.sh

36 lines
700 B
Bash
Raw Normal View History

2022-05-10 13:58:50 -04:00
# load system bashrc
for BASHRC in /etc/bashrc /etc/bash.bashrc /etc/bash/bashrc ; do
if [ -f "$BASHRC" ] ; then
# shellcheck source=/dev/null
. "$BASHRC"
fi
done
unset BASHRC
# load system completions
2021-04-13 14:43:04 -04:00
for rc in /etc/bash_completion /usr/local/share/bash-completion/bash_completion /usr/share/bash-completion/bash_completion ; do
if [ -f "$rc" ] ; then
. "$rc"
fi
done
unset rc
if [ -d /usr/local/etc/bash_completion.d ] ; then
for rc in /usr/local/etc/bash_completion.d/* ; do
if [ -f "$rc" ] ; then
. "$rc"
fi
done
fi
unset rc
complete -cf sudo
2022-05-10 13:58:50 -04:00
# local paths
2022-05-10 15:35:04 -04:00
if ! [[ "$PATH" =~ "$HOME/.local/bin:" ]]
2022-05-10 13:58:50 -04:00
then
2022-05-10 15:35:04 -04:00
PATH="$HOME/.local/bin:$PATH"
2022-05-10 13:58:50 -04:00
fi
export PATH