From 038d7f14f55bc1c91d0d9d64ae5acecd5b5acc45 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 15 Nov 2023 23:16:03 +0800 Subject: Refactor --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index ecece72..35c4ea1 100644 --- a/.bashrc +++ b/.bashrc @@ -14,7 +14,9 @@ source "$HOME/.aliases" source "$HOME/.fzfrc" if command -v fish > /dev/null; then - if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} ]] + if [[ ( $(uname) == Darwin || # the ps command is not invalid in bsd + "$(ps --no-header --pid=$PPID --format=comm)" != "fish") && \ + -z ${BASH_EXECUTION_STRING} ]] then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION='' exec fish $LOGIN_OPTION -- cgit v1.2.3