From 84e27cb356958c5b8981d33acac81eed02c8edb9 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 27 Jul 2017 14:13:34 +0100 Subject: [PATCH] etc/bashrc: Updated to support ksh and zsh Resolves bug-report https://bugs.openfoam.org/view.php?id=2636 --- etc/bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 77bbfa9ca..d92b469b0 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -42,7 +42,7 @@ export WM_PROJECT_VERSION=dev # # Please set to the appropriate path if the default is not correct. # -[ ${BASH_SOURCE:-$0} ] && \ +[ "$BASH" -o "$ZSH_NAME" ] && \ export FOAM_INST_DIR=$(cd $(dirname ${BASH_SOURCE:-$0})/../.. && pwd -P) || \ export FOAM_INST_DIR=$HOME/$WM_PROJECT # export FOAM_INST_DIR=~$WM_PROJECT @@ -211,6 +211,6 @@ unset cleaned foamClean foamOldDirs # Source the bash completion file: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -. $WM_PROJECT_DIR/etc/config.sh/bash_completion +[ "$BASH" ] && . $WM_PROJECT_DIR/etc/config.sh/bash_completion #------------------------------------------------------------------------------