1

export PATH only once per login in zsh

view story
linux-howto

http://unix.stackexchange.com – I need to alter my PATH variable so I put export PATH=$PATH:somedir in my $HOME/.profile which is sourced by my $HOME/.zshrc. This works, yet whenever I open a new terminal (urxvt in X11), .zshrc and thus .profile is read, adding the :somedir to the PATH again. In my day to day computer use, the terminal windows come and go a lot, so after three hours of usage the PATH variable contains hundreds of clones of the :somedir appendix. How do I fix this? Is there a config file which is read by zsh only on login? (HowTos)