zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: [Feature Request]: Globally updated Variables for all zsh instances for same user - just like fish shell
Date: Mon, 13 Jul 2015 11:44:15 -0700	[thread overview]
Message-ID: <150713114415.ZM17170@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3ShNM8n_9JKK=pyoniYA5WmMY0+8=ZV9-kirsSAQuSE_w@mail.gmail.com>

On Jul 13,  8:04pm, Mikael Magnusson wrote:
}
} > We're almost certainly not going to implement the fish model of having a
} > background server process that all other shells can contact to receive
} > environment variable updates.
} 
} One half of it is fairly easy, you can just install a zle -F handler
} (possibly coupled with the zsh/socket module) that updates parameters
} that another process sends it.

The example in the doc for "zle -F" provides a template for this, but I
think a file-based exchange would be preferable.

} The other half, hooking into an
} assignment of an arbitrary parameter to send it out again, I can't
} think of any way of doing.

There's no good way to make "export -U" work, but a module implemented
in the manner of zsh/db/gdbm could define the "exportglobal" command
to create specially-tied variables.  Could even use a GDBM file as the
persistence mechanism, it'd be almost exactly the same as what db_gdbm.c
already does if you limit the universal globals to scalars (otherwise
you have to deal with serializing arrays/hashes).


      reply	other threads:[~2015-07-13 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-12 13:12 Zaxebo Yaxebo
2015-07-12 14:44 ` Christian Neukirchen
2015-07-12 22:42 ` Bart Schaefer
2015-07-13 15:17   ` ZyX
2015-07-13 16:59     ` Bart Schaefer
2015-07-13 18:04   ` Mikael Magnusson
2015-07-13 18:44     ` Bart Schaefer [this message]

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=150713114415.ZM17170@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).