// ZSH-NGINX — NGINX COMPLETION + SERVICE-WRAPPER ALIASES

zsh plugin · nginx tab completion · aliases ngt / ngr for test + restart · vhost templates

GitHub Issues
// Color scheme

>_ZSH-NGINX

nginx commands, one tab away. Tab completion for the nginx binary plus two service-wrapper aliases for the test / restart cycle.

Install

# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-nginx

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-nginx \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-nginx"
# then: plugins+=(zsh-nginx)

# Manual
git clone https://github.com/MenkeTechnologies/zsh-nginx
source zsh-nginx/zsh-nginx.plugin.zsh

Aliases

ngtsudo nginx -t — test the running config
ngrsudo service nginx restart — restart the service

If sudo is not on PATH the prefix is dropped automatically.

Configuration

NGINX_DIRdefault /etc/nginx
NGINX_VHOST_TEMPLATEdefault $ZSH/plugins/nginx/templates/symfony2

Examples

nginx <TAB>        # tab completion for nginx flags / signals
ngt                # test running config (sudo nginx -t)
ngr                # restart service (sudo service nginx restart)

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: