Skip to content
/ redis Public

A Zsh plugin that runs redis database server

License

Notifications You must be signed in to change notification settings

unixorn/redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

redis

This Zsh service-plugin will run redis-server pointing it to configuration file redis.conf. This can be used with plugin zdharma/zredis to have the redis-backend running, to use shared-variables (between shells). Bind the variables using lazy method (-L {type} option):

# Port 4815, database nr. 3, key "MYLIST"
ztie -d db/redis -f "127.0.0.1:4815/3/MYLIST" -L list mylist

The command ztie is provided by zdharma/zredis plugin.

A service-plugin needs a plugin manager that supports loading single plugin instance per all active Zsh sessions, in background. Zplugin supports this, just add:

zplugin ice service'redis'
zplugin light zservices/redis

to ~/.zshrc.

Explanation of Zsh-spawned services

First Zsh instance that will gain a lock will spawn the service. Other Zsh instances will wait. When you close the initial Zsh session, another Zsh will gain lock and resume the service. zdharma/zredis supports reconnecting, so all shared-variables will still work.

About

A Zsh plugin that runs redis database server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages