_nanoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #compdef nanoc
  2. #autoload
  3. # nanoc zsh completion - based on the homebrew zsh completion
  4. # requires the 'nanoc' gem to be installed
  5. local -a _1st_arguments
  6. _1st_arguments=(
  7. 'autocompile:start the autocompiler'
  8. 'compile:compile items of this site'
  9. 'create-item:create an item'
  10. 'create-layout:create a layout'
  11. 'create-site:create a site'
  12. 'deploy:deploy the compiled site'
  13. 'help:show help'
  14. 'prune:remove files not managed by nanoc from the output directory'
  15. 'show-data:show data in this site'
  16. 'show-plugins:show all available plugins'
  17. 'show-rules:describe the rules for each item'
  18. 'update:update the data stored by the data source to a newer version'
  19. 'validate-css:validate the site’s CSS'
  20. 'validate-html:validate the site’s HTML'
  21. 'validate-links:validate links in site'
  22. 'view:start the web server that serves static files'
  23. 'watch:start the watcher'
  24. )
  25. local expl
  26. local -a pkgs installed_pkgs
  27. _arguments \
  28. '(--color)--color[enable color]' \
  29. '(--debug)--debug[enable debugging]' \
  30. '(--help)--help[show the help message and quit]' \
  31. '(--no-color)--no-color[disable color]' \
  32. '(--verbose)--verbose[make nanoc output more detailed]' \
  33. '(--version)--version[show version information and quit]' \
  34. '(--warn)--warn[enable warnings]' \
  35. '*:: :->subcmds' && return 0
  36. if (( CURRENT == 1 )); then
  37. _describe -t commands "nanoc subcommand" _1st_arguments
  38. return
  39. fi