dotfiles/dot_bashrc

36 lines
771 B
Plaintext

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# shellcheck disable=SC2164
if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
# shellcheck disable=SC2164
if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi
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
EDITOR=nvim; export EDITOR
if ! [[ "$PATH" =~ $HOME/.local/bin:$HOME/bin: ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
# shellcheck source=/dev/null
. "$rc"
fi
done
fi
unset rc