From 5ee6bc7cd1b0ca56424011fe25b9c248189e75ea Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 26 Oct 2022 04:04:19 +0000 Subject: [PATCH] Update dotfiles/.bashrc --- dotfiles/.bashrc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index c9910632..794a1831 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -1,6 +1,8 @@ ### Fig -if [ -f "$HOME/.fig/shell/bashrc.pre.bash" ]; then - . "$HOME/.fig/shell/bashrc.pre.bash" +if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then + if [ -f "$HOME/.fig/shell/bashrc.pre.bash" ]; then + . "$HOME/.fig/shell/bashrc.pre.bash" + fi fi ### ~/.profile @@ -262,11 +264,6 @@ if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then ### zoxide command -v zoxide > /dev/null && eval "$(zoxide init bash)" - ### Fig - if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then - . "$HOME/.fig/shell/bashrc.post.bash" - fi - ### MOTD if ([ -n "$SSH_CONNECTION" ] && [ "$SHLVL" -eq 1 ] && [[ $- == *i* ]]) || [ -e qubes-vmexec ] || [ -e qubes-dom0-update ]; then if [ -z "$MOTD" ] || [ "$MOTD" -ne 0 ]; then @@ -282,4 +279,9 @@ if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then fi fi fi + + ### Fig + if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then + . "$HOME/.fig/shell/bashrc.post.bash" + fi fi