From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16624 invoked by alias); 26 Nov 2014 05:56:52 -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: 19441 Received: (qmail 9280 invoked from network); 26 Nov 2014 05:56:49 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Yandex-Uniq: 39e393d4-3916-43d3-aa42-78c37add2372 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1416981055; bh=l7dXRiYHdY9OvrkW+tgeRwzp15M1Sfq+GelwsaoLtm0=; h=User-Agent:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type:Subject:From:Date:To: Message-ID; b=Sa7XK8pV2DvZmfYKvgZ5jHvEfVNYnR17APbl4esEY7DXIeGOYh4SR854h2m7eNl/+ xwnhJpRwLZMEE1+cMrsx6HV9HqleW1sP3Kh5IWz2BoA+AK5QhGaoDD/+5y0XbZWkPj eBwFP/NFr2ViWWUH3m/MTBx8M39Hf3y9mQL7ouAc= Authentication-Results: smtp17.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: K-9 Mail for Android In-Reply-To: <54756007.6060800@eastlink.ca> References: <54752574.5090205@eastlink.ca> <141125203249.ZM18877@torch.brasslantern.com> <54756007.6060800@eastlink.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: export From: =?UTF-8?B?0J/QsNCy0LvQvtCyINCd0LjQutC+0LvQsNC5?= =?UTF-8?B?INCQ0LvQtdC60YHQsNC90LTRgNC+0LLQuNGH?= Date: Wed, 26 Nov 2014 08:50:44 +0300 To: Ray Andrews ,zsh-users@zsh.org Message-ID: <70F0141D-33D9-4398-815B-22EA5BEA3E83@yandex.ru> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On November 26, 2014 8:07:19 AM EAT, 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 In another xterm there is different zsh process. Environment for the new shells is inherited from the parent. It absolutely irrelevant which existing process you may want to modify environment in. The only thing that was added is that with this requirements you may take this environment once at startup (e.g. in $HOME/.zshenv) and not in some hook like precmd. And it does not do what it does "in xterm". It only does thing for the current shell process and next process run from the shell only inherits the environment. Given the existence of screen and dtach (not tmux: here environment is inherited from the server) you may migrate shells between terminal emulators. Or start screen in one and attach in its neighbour: after some scripting this may be a solution. Tmux may also be a solution: if you export in your shell and then repeat "export" using "tmux set-environment -g" then exported variable will appear in all new tmux instances. -----BEGIN PGP SIGNATURE----- Version: APG v1.1.1 iQJNBAEBCgA3BQJUdWoyMBwfMDI7PjIgHTg6PjswOSAQOzU6QTA9NEA+MjhHIDxr cC1wYXZAeWFuZGV4LnJ1PgAKCRBu+P2/AXZZIns4EADOYIUvpa4jnzqL3EKkEw5A nqOk2l8ytAgiK9Y4Nxd/9NTJMJ41H4sFJO/0bE3RARhx5eeVcItLgFnLaRKm5AyR ghDeiRJgehcrph+gQFqKROWJ4jLFG62HuWDXlkqWuVcpLZHf9JE//nMQFl3RLjc1 gW4szARFQUhGb4E0bQhg7T+wZzA2KF1tb8Nhj1pt23/LvyZzot3Hnj5TQvvogZ2d Ajajk42e/Z8rRvwuZDc8u1uiSwwhM9NoFXbaQEUDO+ddpS4CQW1cyxeYa9u7y2S5 jzV09STtQb4V6hBhPKS5JqZiCGYwjS4k/yGvWPnyck6WIw6UhPuPMhmHjw1AGYOt tPrzMu3h6H2XAPVh6HvtPhkqvPTvUO9g3B6aJDYjXh1YvDMnPjOIgUL/naSyML5E qCzoP9oOtaeqkyxkLidBKnrxW2/1/ExwjAg9gj7244zOxXRDd+L4o3S6bG+4Z1iR w+T4fltR0v7e3Ad3lbM0nERl8UaWhbQMhvIL7d8WCA/dSbdxuee3dATYk+y/Ucaw uLItZXiyPj2jBowoOuNONkjOqgqaUI18Uu7QTMaUBBs4fXiIPbJziqh5W8/P629A CZwME1Cwq8tgPn1ggsnkG6o4X27u1w9WqBSmarAGh5tBb+CGXdGtl/D/DwerJDsb omg7NC9P5XLcLXmSGL9uRw== =+xrg -----END PGP SIGNATURE-----