diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-17 09:45:35 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-17 09:45:35 +1300 |
commit | fc04c0e9ad545fafd7d379cc5db7569e6b90af60 (patch) | |
tree | eb67defb9201f9f99b527f25eaa4e2a1d1e7ef0b | |
parent | shellcheck suggested a more efficient assignment (diff) | |
download | dotfiles-fc04c0e9ad545fafd7d379cc5db7569e6b90af60.tar.gz dotfiles-fc04c0e9ad545fafd7d379cc5db7569e6b90af60.zip |
Condense ENV_EXT hack, unset it
-rw-r--r-- | ksh/shrc.d/ksh.sh | 5 | ||||
-rw-r--r-- | sh/shrc | 3 |
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 @@ -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 |