aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-30 22:31:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-30 22:42:56 +1300
commit0d79eeb3ab41cf49310ec53e6cf55ccbfe2f7e31 (patch)
tree7d49a185ae556ee2a89818cab4d6d85747696875 /sh
parentAdd environment variable (diff)
downloaddotfiles-0d79eeb3ab41cf49310ec53e6cf55ccbfe2f7e31.tar.gz
dotfiles-0d79eeb3ab41cf49310ec53e6cf55ccbfe2f7e31.zip
Fix a zsh-as-sh/ksh-specific issue
Very niche, but interesting to fix anyway
Diffstat (limited to 'sh')
-rw-r--r--sh/profile8
1 files changed, 8 insertions, 0 deletions
diff --git a/sh/profile b/sh/profile
index 5d9c80bf..dc145d85 100644
--- a/sh/profile
+++ b/sh/profile
@@ -12,3 +12,11 @@ if [ -f "$HOME"/.shinit ] ; then
ENV=$HOME/.shinit
export ENV
fi
+
+# If ENV_FORCE is set and we're interactive, source ENV explicitly
+# At the moment this is just for zsh-as-ksh/sh
+if [ -n "$ENV_FORCE" ] ; then
+ case $- in *i*)
+ [ -f "$ENV" ] && . "$ENV" ;;
+ esac
+fi