Hacker News new | ask | show | jobs
by soraminazuki 2434 days ago
‘typeset -U path’ would be a more simple alternative.
1 comments

Yeah, 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"
    )