aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc10
1 files changed, 6 insertions, 4 deletions
diff --git a/.bashrc b/.bashrc
index 35c4ea1..999df4e 100644
--- a/.bashrc
+++ b/.bashrc
@@ -2,6 +2,7 @@
# ~/.bashrc
#
+[ "$(uname)" = Darwin ] && source "$HOME/.macos"
source "$HOME/.env"
source "$HOME/.path"
@@ -13,12 +14,13 @@ PS1='[\u@\h \W]\$ '
source "$HOME/.aliases"
source "$HOME/.fzfrc"
+
if command -v fish > /dev/null; then
- if [[ ( $(uname) == Darwin || # the ps command is not invalid in bsd
- "$(ps --no-header --pid=$PPID --format=comm)" != "fish") && \
- -z ${BASH_EXECUTION_STRING} ]]
+ __FISH_IS_ACTIVE=${__FISH_IS_ACTIVE:-0}
+ if [[ -z ${BASH_EXECUTION_STRING} && $__FISH_IS_ACTIVE -eq 0 ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
- exec fish $LOGIN_OPTION
+ exec env __FISH_IS_ACTIVE=1 fish $LOGIN_OPTION
fi
+ export __FISH_IS_ACTIVE=0
fi