6 ms·
If something like `export PATH="aa:$PATH"` is written in `.zshenv`, as the file is sourced even for nested zsh sessions, a new `aa` will be prepended for each z
by rucikir 7y ago
If something like `export PATH="aa:$PATH"` is written in `.zshenv`, as the file is sourced even for nested zsh sessions, a new `aa` will be prepended for each zsh level. Consider protecting that kind of expansion (if you use it) with `if [[ $SHLVL == 1 ]]; then ...; fi`.
- soraminazuki 7y ago‘typeset -U path’ would be a more simple alternative.
- bloopernova 7y agoYeah, I like this in zsh: # Only allow unique entries in the PATH variable typeset -U path # Easier to read PATH variable modification: path+=( "${JAVA_HOME}/bin" "${GOPATH}/bin" )