dotfiles/dot_config/bash/bash-setup.sh

36 lines
700 B
Bash

# 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
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
# local paths
if ! [[ "$PATH" =~ "$HOME/.local/bin:" ]]
then
PATH="$HOME/.local/bin:$PATH"
fi
export PATH