my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.6 KiB

3 years ago
  1. #compdef nanoc
  2. #autoload
  3. # requires the 'nanoc' gem to be installed
  4. local -a _1st_arguments
  5. _1st_arguments=(
  6. 'check:run issue checks'
  7. 'compile:compile items of this site'
  8. 'create-site:create a site'
  9. 'deploy:deploy the compiled site'
  10. 'help:show help'
  11. 'prune:remove files not managed by nanoc from the output directory'
  12. 'shell:open a shell on the Nanoc environment'
  13. 'show-data:show data in this site'
  14. 'show-plugins:show all available plugins'
  15. 'show-rules:describe the rules for each item'
  16. 'view:start the web server that serves static files'
  17. )
  18. local expl
  19. local -a pkgs installed_pkgs
  20. _arguments \
  21. '(--color)--color[enable color]' \
  22. '(--debug)--debug[enable debugging]' \
  23. '(--env)--env[set environment]' \
  24. '(--help)--help[show the help message and quit]' \
  25. '(--no-color)--no-color[disable color]' \
  26. '(--verbose)--verbose[make output more detailed]' \
  27. '(--version)--version[show version information and quit]' \
  28. '(--warn)--warn[enable warnings]' \
  29. '*:: :->subcmds' && return 0
  30. case "$state" in
  31. subcmds)
  32. case $words[1] in
  33. check)
  34. _arguments \
  35. '(--preprocess)--preprocess[run preprocessor]'
  36. ;;
  37. compile)
  38. _arguments \
  39. '(--diff)--diff[generate diff]'
  40. ;;
  41. compile)
  42. _arguments \
  43. '(--diff)--diff[generate diff]'
  44. ;;
  45. create-site)
  46. _arguments \
  47. '(--force)--force[force creation of new site]'
  48. ;;
  49. deploy)
  50. _arguments \
  51. '(--target)--target[specify the location to deploy to (default: `default`)]' \
  52. '(--no-check)--no-check[do not run the issue checks marked for deployment]' \
  53. '(--list)--list[list available locations to deploy to]' \
  54. '(--list-deployers)--list-deployers[list available deployers]' \
  55. '(--dry-run)--dry-run[show what would be deployed]'
  56. ;;
  57. prune)
  58. _arguments \
  59. '(--yes)--yes[confirm deletion]' \
  60. '(--dry-run)--dry-run[print files to be deleted instead of actually deleting them]'
  61. ;;
  62. shell)
  63. _arguments \
  64. '(--preprocess)--preprocess[run preprocessor]'
  65. ;;
  66. view)
  67. _arguments \
  68. '(--handler)--handler[specify the handler to use (webrick/mongrel/...)]' \
  69. '(--host)--host[specify the host to listen on (default: 127.0.0.1)]' \
  70. '(--port)--port[specify the port to listen on (default: 3000]' \
  71. '(--live-reload)--live-reload[reload on changes]'
  72. ;;
  73. esac
  74. ;;
  75. esac
  76. if (( CURRENT == 1 )); then
  77. _describe -t commands "nanoc subcommand" _1st_arguments
  78. return
  79. fi