main/zsh: /etc/zsh/zprofile tries and fails to add $HOME/bin to PATH
/etc/zsh/zprofile
tries to append $HOME/bin
to PATH
, but fails to do so. /etc/zsh/zprofile
contains the following on lines 5 and 6:
PATH="$PATH:$HOME/bin"
export PATH
However, the very next thing /etc/zsh/zprofile
does is source /etc/profile
, which does this:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This clobbers the changes made on lines 5 and 6.
I'd suggest either:
- deleting lines 5 and 6 from
/etc/zsh/zprofile
, or - moving them to the end of the file after
_src_etc_profile
gets run.
(There's an argument to be made that PATH
shouldn't be set in zprofile
at all, but I'll save that for another day.
Steps to reproduce:
apk add zsh
zsh -l
echo $PATH