Skip to content

Instantly share code, notes, and snippets.

@Misaghlb
Created January 9, 2017 16:30
Show Gist options
  • Select an option

  • Save Misaghlb/d153bf84ee63f8adb42616e7a0245a81 to your computer and use it in GitHub Desktop.

Select an option

Save Misaghlb/d153bf84ee63f8adb42616e7a0245a81 to your computer and use it in GitHub Desktop.
oh-my-zsh autocompletion plugin for hexo static site generator
# 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"
@Misaghlb
Copy link
Author

Misaghlb commented Jan 9, 2017

put into : ~/.oh-my-zsh/plugins/hexo/
and add hexo to your .zshrc plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment