aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-11-15 23:16:03 +0800
committerGuangxiong Lin <[email protected]>2023-11-15 23:16:03 +0800
commit038d7f14f55bc1c91d0d9d64ae5acecd5b5acc45 (patch)
tree812c20e1fe508338216c477935a00a78709715c2
parent1ee184c609ff4c712b1be91d4ce9c14a22619ea8 (diff)
downloaddotfiles-038d7f14f55bc1c91d0d9d64ae5acecd5b5acc45.tar.gz
dotfiles-038d7f14f55bc1c91d0d9d64ae5acecd5b5acc45.tar.bz2
dotfiles-038d7f14f55bc1c91d0d9d64ae5acecd5b5acc45.zip
Refactor
-rw-r--r--.bashrc4
1 files changed, 3 insertions, 1 deletions
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