My setup is zsh 5.0.5 in arch linux
I have set the PATH variable as below in .zshenv
typeset -U path
path=(~/bin $path)
DW=$HOME/Downloads
It seems that when you have macos or some linux distros there is a canonical solution to the problem which involves /etc/paths
or /etc/paths.d
. You should be letting /usr/libexec/path_helper
construct your path for you using configuration files.
This immediately solved the problem in all places for me.