It add sc-COMMAND
aliases to systemctl COMMAND
with sudo
if necessary.
Install plugin:
git clone git://github.com/mikcho/zsh-systemd $ZSH_CUSTOM/plugins/zsh-systemd
Edit ~/.zshrc
to enable plugin:
plugins=(zsh-systemd)
Source ~/.zshrc
:
source ~/.zshrc
Add the plugin into ~/.zshrc
:
zplug "mikcho/zsh-systemd"
Some examples:
Before: systemctl status nginx
After: sc-status nginx
Before: sudo systemctl restart nginx
After: sc-restart nginx
Before: sudo systemctl reboot
After: sc-reboot