zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: sharing environment between terminals.
Date: Sun, 18 Nov 2012 15:11:12 -0800	[thread overview]
Message-ID: <50A96B10.6060208@eastlink.ca> (raw)
In-Reply-To: <20121118193340.2879a349@pws-pc.ntlworld.com>

On 18/11/12 11:33 AM, Peter Stephenson wrote:
> On Sun, 18 Nov 2012 10:35:14 -0800
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>> On Nov 17,  4:39pm, Ray Andrews wrote:
>> }
>> } Is there a way to instantly share environment variables between running
>> } terminals?
>>
>> Generally speaking, no.  The environment of each process is private to
>> that process, allocated by the operating system at the time the process
>> is forked.
>>
>> If desperate enough, you could set up something using the zsh/tcp module
>> to have your shells cooperatively swap new environment strings around.
>> One shell (or an external daeamon of some kind -- condsider the model
>> used by ssh-agent) would have to control the "master" environment, and
>> hand out changes to the other shells on request.  The other shells would
>> check at opportune times (during precmd for example) whether changes are
>> available, and apply them.
> It might be easier to intercept typeset etc. and turn them into shell
> functions that save the environment.  You'd probably need to do some
> fairly nifty history-style timestamping to ensure you didn't simply
> reimport the entire environment each time, however --- particularly to
> ensure you got the latest results over all shells.
>
> Hmm, I wonder if doing something clever examining the actual saved
> history (with INC_APPEND_HISTORY set) would help?
>
Peter,

For now, I'm not going to get out of my depth with things. My nastly 
little hack does what I need it to do, so I'm going to rest with that 
for now unless there is a 'lite' fix that I can understand.


  reply	other threads:[~2012-11-18 23:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18  0:39 Ray Andrews
2012-11-18 18:35 ` Bart Schaefer
2012-11-18 19:22   ` Ray Andrews
2012-11-18 19:33   ` Peter Stephenson
2012-11-18 23:11     ` Ray Andrews [this message]
2012-11-19  0:22 ` Phil Pennock
2012-11-19 16:23   ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A96B10.6060208@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).