Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    The $path array is tied to the $PATH scalar in csh, tcsh or zsh. The OP's code is in zsh syntax (var=(...), var+=(...) are from zsh, source is from csh), but /etc/profile should be in a syntax compatible with all the shells that read it, not in zsh-specific (or bash-specific, ksh-specific...) syntax. Commented Aug 24, 2023 at 12:57