aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-17 09:45:35 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-17 09:45:35 +1300
commitfc04c0e9ad545fafd7d379cc5db7569e6b90af60 (patch)
treeeb67defb9201f9f99b527f25eaa4e2a1d1e7ef0b
parentshellcheck suggested a more efficient assignment (diff)
downloaddotfiles-fc04c0e9ad545fafd7d379cc5db7569e6b90af60.tar.gz
dotfiles-fc04c0e9ad545fafd7d379cc5db7569e6b90af60.zip
Condense ENV_EXT hack, unset it
-rw-r--r--ksh/shrc.d/ksh.sh5
-rw-r--r--sh/shrc3
2 files changed, 3 insertions, 5 deletions
diff --git a/ksh/shrc.d/ksh.sh b/ksh/shrc.d/ksh.sh
index 8e33da7c..6101fc84 100644
--- a/ksh/shrc.d/ksh.sh
+++ b/ksh/shrc.d/ksh.sh
@@ -28,8 +28,5 @@ if [ -z "$KSH_VERSION" ] ; then
KSH_VERSION=${.sh.version}
fi
-# If KSH_ENV isn't already set, set it
-[ -n "$KSH_ENV" ] || KSH_ENV=$HOME/.kshrc
-
# If ENV_EXT isn't already set, set it
-[ -n "$ENV_EXT" ] || ENV_EXT=$KSH_ENV
+[ -n "$ENV_EXT" ] || ENV_EXT=$HOME/.kshrc
diff --git a/sh/shrc b/sh/shrc
index 879c8947..33c55e8f 100644
--- a/sh/shrc
+++ b/sh/shrc
@@ -20,5 +20,6 @@ for sh in "$HOME"/.shrc.d/*.sh ; do
done
unset -v sh
-# If ENV_EXT was set and exists, source that too
+# If ENV_EXT was set and exists, source that too, then clean it away
[ -e "$ENV_EXT" ] && . "$ENV_EXT"
+unset -v ENV_EXT