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

Re: export



Each process gets a private copy of the environment provided by its parent.
An xterm is just a process. In your example you have this chain of
processes (parent => child):

  xterm => zsh => zsh

There is no way for an arbitrary zsh process to affect the environment of
an arbitrary xterm process.

On Tue, Nov 25, 2014 at 9:07 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:

> On 11/25/2014 08:32 PM, Bart Schaefer wrote:
>
>> On Nov 25,  4:57pm, Ray Andrews wrote:
>> } Subject: export
>> }
>> } When I export a variable it is only available in subsequent shells in
>> } the same xterm. Can I make it export globally?
>>
>>
> You guys don't understand what I'm asking.  I know I can't pass
> variables 'backwards' (except via a file), but when I export, the
> variable will be available  in *subsequent* shells but only in the
> same xterm:
>
>         pts/2 HP-y5--5-Debian1 root /aWorking/Zsh $ export trash=TRASH
>
>         pts/2 HP-y5--5-Debian1 root /aWorking/Zsh $ zsh
>
>         pts/2 HP-y5--5-Debian1 root /aWorking/Zsh $ echo $trash
>         TRASH
>
> ... export does what it should do, but *only* in the same xterm.
> If I now go to another xterm, $trash is not set:
>
>         pts/9 HP-y5--5-Debian1 root /boot/Clone/y8--5-Debian2 $ zsh
>
>         pts/9 HP-y5--5-Debian1 root /boot/Clone/y8--5-Debian2 $ echo $trash
>
>
>
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank


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