Zsh Mailing List Archive
Messages sorted by:
Re: [Feature Request]: Globally updated Variables for all zsh instances for same user - just like fish shell
- X-seq: zsh-workers 35788
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- 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
- In-reply-to: <CAHYJk3ShNM8n_9JKK=pyoniYA5WmMY0+8=ZV9-kirsSAQuSE_w@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CABq-E=P8cOK=QbHmGAkL+0XCj-6yg0E2svYZs1OB1v=zYUg0_A@mail.gmail.com> <150712154233.ZM5772@torch.brasslantern.com> <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).
Messages sorted by: