diff --git a/plugins/hexo/hexo.plugin.zsh b/plugins/hexo/hexo.plugin.zsh new file mode 100644 index 000000000..d64a9667f --- /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"