diff --git a/bin/foamExec b/bin/foamExec
index 711e3f7a8e185abd27169661b1fea4040270e186..66892c525bc11050afa519d1a95ecfea68200e6a 100755
--- a/bin/foamExec
+++ b/bin/foamExec
@@ -122,7 +122,7 @@ sourceRc()
     # extra safety when sourcing the bashrc
     [ -n "$prefix" ] && export FOAM_INST_DIR="$prefix"
 
-    . $foamDotFile
+    . $foamDotFile $FOAM_SETTINGS
 }
 
 
diff --git a/etc/bashrc b/etc/bashrc
index edbf3064f07c98bbedddb6684951e696235d28c6..d2539c5b5012bcf606366ef7d4d33bc24f617f1a 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -144,6 +144,10 @@ _foamEval()
     while [ $# -gt 0 ]
     do
         case "$1" in
+        -*)
+            # stray option (not meant for us here) -> get out
+            break
+            ;;
         *=)
             # name=       -> unset name
             [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}"
diff --git a/etc/cshrc b/etc/cshrc
index 9b824f0c99fa438f9262673ca6f0637fc893e9c4..c2c1b12a9b7757074536e74a937a034b7e07ad58 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -142,6 +142,10 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
 setenv FOAM_SETTINGS "${*}"
 while ( $#argv > 0 )
     switch ($argv[1])
+    case -*:
+        # stray option (not meant for us here) -> get out
+        break
+        breaksw
     case *=:
         # name=       -> unsetenv name
         if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//"