Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Correct way to set environment



Hello,

I'm a bit puzzled about the way to set global environment variables.

I've ushed .zshenv for that purpose since it is sourced on every shell
invocation.

florian@horus ~ % cat .zshenv
PATH=$HOME/flof/src:$HOME/software/bin:$PATH
PATH=/home/florian/software/src/boar:$PATH

PYTHONPATH=$HOME/flof/src:$PYTHONPATH


No other relevant z-files are present. This works as far as it sets
the PYTHONPATH variable but if I launch python it is not taken into
account. When I use export PYTHONPATH, the pythonpath gets longer and
longer if I invoke a zsh session within a zsh session.

What is the best way to set some environment variables, no matter how
(login, interactive, ...) the shell is invoced?

Thanks,

Florian



Messages sorted by: Reverse Date, Date, Thread, Author