env: auto source ~/.profile if it wasn't sourced

This commit is contained in:
PowerUser64 2022-09-17 20:01:28 -07:00
parent 35db2c6337
commit 23252e5b28

View file

@ -8,6 +8,10 @@ if ! [ -d "$SHELL_CONFIG_DIR" ]; then
echo "FATAL ERROR: \$SHELL_CONFIG_DIR is not set to a real directory: $SHELL_CONFIG_DIR" >&2 echo "FATAL ERROR: \$SHELL_CONFIG_DIR is not set to a real directory: $SHELL_CONFIG_DIR" >&2
fi fi
if [ -z "$PROFILE_LOADED" ] && [ -f ~/.profile ]; then
. ~/.profile
fi
# Intelligently set $EDITOR # Intelligently set $EDITOR
if command -v nvim > /dev/null;then if command -v nvim > /dev/null;then
export EDITOR=nvim export EDITOR=nvim