2021-04-12 21:56:06 -04:00
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
2021-05-11 12:28:44 -04:00
|
|
|
# shellcheck disable=SC2164
|
2021-04-12 21:56:06 -04:00
|
|
|
if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
|
2021-05-11 12:28:44 -04:00
|
|
|
# shellcheck disable=SC2164
|
2021-04-12 21:56:06 -04:00
|
|
|
if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi
|
|
|
|
|
2021-04-13 14:43:04 -04:00
|
|
|
for BASHRC in /etc/bashrc /etc/bash.bashrc /etc/bash/bashrc ; do
|
|
|
|
if [ -f "$BASHRC" ] ; then
|
2021-05-11 12:28:44 -04:00
|
|
|
# shellcheck source=/dev/null
|
2021-04-13 14:43:04 -04:00
|
|
|
. "$BASHRC"
|
2021-04-12 21:56:06 -04:00
|
|
|
fi
|
2021-04-13 14:43:04 -04:00
|
|
|
done
|
|
|
|
unset BASHRC
|
2021-04-12 21:56:06 -04:00
|
|
|
|
2021-04-13 14:43:04 -04:00
|
|
|
EDITOR=nvim; export EDITOR
|
2021-04-12 21:56:06 -04:00
|
|
|
|
2021-05-11 12:28:44 -04:00
|
|
|
if ! [[ "$PATH" =~ $HOME/.local/bin:$HOME/bin: ]]
|
2021-04-13 14:43:04 -04:00
|
|
|
then
|
|
|
|
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
|
|
|
fi
|
|
|
|
export PATH
|
2021-04-12 21:56:06 -04:00
|
|
|
|
|
|
|
# User specific aliases and functions
|
|
|
|
if [ -d ~/.bashrc.d ]; then
|
2021-04-13 14:43:04 -04:00
|
|
|
for rc in ~/.bashrc.d/*; do
|
|
|
|
if [ -f "$rc" ]; then
|
2021-05-11 12:28:44 -04:00
|
|
|
# shellcheck source=/dev/null
|
2021-04-13 14:43:04 -04:00
|
|
|
. "$rc"
|
|
|
|
fi
|
|
|
|
done
|
2021-04-12 21:56:06 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
unset rc
|