Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Spawning services from Zshell, to have everything in zshrc



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



Messages sorted by: Reverse Date, Date, Thread, Author