My personal 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.

_docpad 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #compdef docpad
  2. # ------------------------------------------------------------------------------
  3. # Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions are met:
  8. # * Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # * Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the distribution.
  13. # * Neither the name of the zsh-users nor the
  14. # names of its contributors may be used to endorse or promote products
  15. # derived from this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
  21. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  26. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. # ------------------------------------------------------------------------------
  28. # Description
  29. # -----------
  30. #
  31. # Completion script for docpad (https://github.com/bevry/docpad).
  32. #
  33. # ------------------------------------------------------------------------------
  34. # Authors
  35. # -------
  36. #
  37. # * Changwoo Park (https://github.com/pismute)
  38. #
  39. # ------------------------------------------------------------------------------
  40. local curcontext="$curcontext" state line ret=1
  41. local -a _1st_arguments
  42. _1st_arguments=(
  43. 'run: run [options], does everything - skeleton, generate, watch, server'
  44. 'server: server [options], creates a server for your generated project'
  45. 'skeleton: skeleton [options], will create a new project in your cwd based off an existing skeleton'
  46. 'render: render [path], render the file at <path> and output its results to stdout:path:_files'
  47. 'generate: (re)generates your project'
  48. 'watch: watches your project for changes, and (re)generates whenever a change is made'
  49. 'install: ensure everything is installed correctly'
  50. 'clean: ensure everything is cleaned correctly'
  51. 'info: display the information about your docpad instance'
  52. 'help: output the help'
  53. )
  54. _arguments -C \
  55. '(-h,--help)'{-h,--help}'[output usage information]'\
  56. '(-V,--version)'{-V,--version}'[output the version number]'\
  57. '(-o,--out)'{-o,--out}'[where to output the rendered directory or files]:path:_files'\
  58. '(-c,--config)'{-c,--config}'[a custom configuration file to load in]:path:_files'\
  59. '(-e,--env)'{-e,--env}'[the environment name to use for this instance, multiple names can be separated with a comma]'\
  60. '(-d,--debug)'{-d,--debug}'+[the level of debug messages you would like to display, if specified defaults to 7, otherwise 6]:number'\
  61. '(-f,--force)'{-f,--force}'[force a re-install of all modules]'\
  62. '1: :->cmds'\
  63. '*: :_files'&& ret=0
  64. case $state in
  65. cmds)
  66. _describe -t commands 'docpad command' _1st_arguments && ret=0
  67. ;;
  68. esac
  69. return ret
  70. # Local Variables:
  71. # mode: Shell-Script
  72. # sh-indentation: 2
  73. # indent-tabs-mode: nil
  74. # sh-basic-offset: 2
  75. # End:
  76. # vim: ft=zsh sw=2 ts=2 et