From f3bbeae3c8267ed29c88acf071d8722010f2e6ac Mon Sep 17 00:00:00 2001 From: Misagh Date: Mon, 9 Jan 2017 17:25:14 +0330 Subject: [PATCH] Add plugin for hexo blog framework --- plugins/hexo/hexo.plugin.zsh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/hexo/hexo.plugin.zsh diff --git a/plugins/hexo/hexo.plugin.zsh b/plugins/hexo/hexo.plugin.zsh new file mode 100644 index 00000000..d64a9667 --- /dev/null +++ b/plugins/hexo/hexo.plugin.zsh @@ -0,0 +1,15 @@ +# hexo basic command completion +_hexo_get_command_list () { + hexo --no-ansi | awk '/(--|^ +[a-z]+)/{ print $1 }' +} + +_hexo () { + compadd `_hexo_get_command_list` + +} + +compdef _hexo hexo + +alias hes="hexo server" +alias heg="hexo generate" +alias hed="hexo deploy"