From d161b90684b54dbcca0c39897b33a2191741157d Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Sun, 13 Nov 2016 20:09:27 +0500 Subject: [PATCH] Add serve completion plugin --- plugins/serve/serve.plugin.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 plugins/serve/serve.plugin.zsh diff --git a/plugins/serve/serve.plugin.zsh b/plugins/serve/serve.plugin.zsh new file mode 100644 index 000000000..4a00872eb --- /dev/null +++ b/plugins/serve/serve.plugin.zsh @@ -0,0 +1,22 @@ +#!/usr/bin/env zsh + +# +# serve-autocompletion-zsh +# +# Autocompletion for `serve` static HTTP server +# +# Copyright(c) 2016 Alexander Krivoshhekov +# MIT Licensed +# + +# +# Alexander Krivoshhekov +# Github: https://github.com/SuperPaintman +# + +if [[ -z $commands[serve] ]] || ! serve --completion=zsh >/dev/null 2>&1; then + echo 'serve is not installed, you should install "https://github.com/SuperPaintman/serve" first' + return -1 +fi + +eval "$(serve --completion=zsh)"