summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:02:30 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:06:33 -0500
commitd09fa8687ee01dcb4ef540deb106b8531f56b403 (patch)
tree81361203eb674e1a49f15498ddce3aebb23ddac3
parent65cb251ba9d9203056c3c71e49576d7bd7e36069 (diff)
login.d/00_path.sh: don't leak temporary variables
-rw-r--r--.config/login.d/00_path.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh
index 2d5f4a5..ae2e8db 100644
--- a/.config/login.d/00_path.sh
+++ b/.config/login.d/00_path.sh
@@ -1,8 +1,12 @@
#!/hint/sh
+eval "$(
if type config-path &>/dev/null; then
config_path=config-path
else
# Bootstrap finding config-path
config_path="$HOME/.local/bin/config-path"
fi
-eval "$(IFS=$'\n'; lines=($("$config_path")); printf -- 'export %s\n' "${lines[@]}")"
+IFS=$'\n'
+lines=($("$config_path"))
+printf -- 'export %s\n' "${lines[@]}"
+)"