Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Correct way to set environment
Hi Florian,
Have you tried to export the vars? Then subprocesses should see the values.
Greetings from Cologne, Germany,
cu Stefan
--
Stefan Marx <Stefan.Marx@xxxxxxxxxxxxxxxxxxx>
+49 171-2116079
Am 15.12.2012 um 14:29 schrieb Florian Lindner <mailinglists@xxxxxx>:
> 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