aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_profile
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_profile')
-rw-r--r--bash/bash_profile7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash/bash_profile b/bash/bash_profile
index a520f051..0376ee57 100644
--- a/bash/bash_profile
+++ b/bash/bash_profile
@@ -1,6 +1,13 @@
# Load ~/.profile regardless of shell version
[ -e "$HOME"/.profile ] && . "$HOME"/.profile
+# If POSIXLY_CORRECT is set after doing that, force the `posix` option on and
+# don't load the rest of this stuff--so, just ~/.profile and ENV
+if [ -n "$POSIXLY_CORRECT" ] ; then
+ set -o posix
+ return
+fi
+
# If ~/.bashrc exists, source that too; the tests for both interactivity and
# >=2.05a (for features like [[) are in there
[ -f "$HOME"/.bashrc ] && . "$HOME"/.bashrc