diff options
author | Daniel Holman <dholman@gymli.org> | 2018-04-08 00:25:50 -0500 |
---|---|---|
committer | Daniel Holman <dholman@gymli.org> | 2018-04-08 00:25:50 -0500 |
commit | ce86b3802b591eed658670057f5e0e61fbeafa05 (patch) | |
tree | 9de5fb349706caae5d7ebe721f3b85a5d7b92191 | |
parent | 928e507d33e1192ca1f8d3413a352c30909286fb (diff) |
Fixed PATH issue in .zshenv
Fixed an issue in .zshenv in which the PATH environment variable would
be appended with duplicate entries
-rw-r--r-- | .zshenv | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,5 +1,16 @@ +# Environment functions +appendpath () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + # Setup environment -export PATH="$PATH:/home/dholman/bin" +appendpath '/home/dholman/bin' +export PATH export EDITOR="vim" export SUDO_EDITOR="vim" export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 |