From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Zsh Users <zsh-users@zsh.org>
Subject: Spawning services from Zshell, to have everything in zshrc
Date: Sun, 31 Dec 2017 16:23:28 +0100 [thread overview]
Message-ID: <etPan.5a4900f0.a2b25dc.13d7@zdharma.org> (raw)
Hello
When I wanted to configure variables shared between Zshells, with `zdharma/zredis' plugin, I noted it doesn't look right that I have to revert to OS X `launchd' service manager. The variables are a shell thing, I set up them in zshrc, together with `zdharma/zredis' plugin, so I thought `redis-server' should be set up the same way.
I added such feature to Zplugin. To spawn a background service, one has to use "service" keyword (Ice-modifier):
zplugin ice service'redis'
zplugin light zservices/redis
The plugin `zservices/redis' is special, such plugins are listed on https://github.com/zservices
First Zshell that will gain a lock, will spawn the service. If this particular shell will be closed, next Zshell will pick up the service and spawn it. `zdharma/zredis` supports reconnecting, so restarts are no problem.
More information: https://github.com/zdharma/zplugin#news
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
reply other threads:[~2017-12-31 15:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=etPan.5a4900f0.a2b25dc.13d7@zdharma.org \
--to=psprint@zdharma.org \
--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).