1 | #!/bin/zsh
|
2 |
|
3 | # Borrowed from grunt-cli
|
4 | # http://gruntjs.com/
|
5 | #
|
6 | # Copyright (c) 2012 Tyler Kellen, contributors
|
7 | # Licensed under the MIT license.
|
8 | # https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
9 |
|
10 | # Usage:
|
11 | #
|
12 | # To enable zsh <tab> completion for hexo, add the following line (minus the
|
13 | # leading #, which is the zsh comment character) to your ~/.zshrc file:
|
14 | #
|
15 | # eval "$(hexo --completion=zsh)"
|
16 |
|
17 | # Enable zsh autocompletion.
|
18 | function _hexo_completion() {
|
19 | compls=$(hexo --console-list)
|
20 | completions=(${=compls})
|
21 | compadd -- $completions
|
22 | }
|
23 |
|
24 | compdef _hexo_completion hexo
|