From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22504 invoked by alias); 26 Nov 2014 05:54:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19440 Received: (qmail 22986 invoked from network); 26 Nov 2014 05:54:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z5f2pqszM9fvk12JWopUNLbG5N+Of4DfbuLWP6CEU0k=; b=V4KdizHWc8J4wDOwcfNLGewwKFGg5bJ+vv+KtfngHGEfPf51mztVkHFIeSo1AjmbEH wsU7tR2XEHMuJYWBREa6QhuXVVcc8PsljKCKKYrTVkaDe6vxoG52fioxn3mjsTeNUY30 dU38M4Jriz9L/B4VQsQzr+rUnZK0c1AEnPnUACe1VGxSL4XIctIZj1o0o2EqxpFzMswF XWTVdVsSDp0WAs7PM6Wf0xm0rK1aT8jVoR8FzRrpb/vAzURFompgBn0MO56bVqeUKZyp XQFvksmPhY/LooqV1a+TmQVu8ym/2VBbRUr9rkK9rDwRIY+yZKB3cZ5OaTUFJ4XZMi2U 2uZg== X-Gm-Message-State: ALoCoQkgc/FXN3vLQ++4t4VO1SaZAihsfrPCweYcJzoXQPLrRIq3iCM75I99bppks8jGOmuVJRQ2 MIME-Version: 1.0 X-Received: by 10.152.36.232 with SMTP id t8mr26956602laj.6.1416981248359; Tue, 25 Nov 2014 21:54:08 -0800 (PST) In-Reply-To: References: <54752574.5090205@eastlink.ca> <141125203249.ZM18877@torch.brasslantern.com> <54756007.6060800@eastlink.ca> Date: Tue, 25 Nov 2014 21:54:08 -0800 Message-ID: Subject: Re: export From: Kurtis Rader To: Ray Andrews Cc: Zsh Users Content-Type: multipart/alternative; boundary=089e0160a9d2f654b00508bca78b --089e0160a9d2f654b00508bca78b Content-Type: text/plain; charset=UTF-8 In general a process, whether it is a zsh or other program, cannot affect the environment of any other program. It can only provide the initial state for a new program that it executes. That is what is happening in your example. You are interacting with a zsh process spawned by a xterm. In that zsh process you modify its environment. You then spawn a new shell which inherits a private copy of that environment. There is no way to modify the private copy a given process has of its environment. On Tue, Nov 25, 2014 at 9:43 PM, Kurtis Rader wrote: > 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 > 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 > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --089e0160a9d2f654b00508bca78b--