My personal dotfiles
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #compdef cap
  2. # ------------------------------------------------------------------------------
  3. # Copyright (c) 2016 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 Capistrano (http://capify.org).
  32. #
  33. # ------------------------------------------------------------------------------
  34. # Authors
  35. # -------
  36. #
  37. # * Bruno Michel (https://github.com/nono)
  38. #
  39. # ------------------------------------------------------------------------------
  40. local curcontext="$curcontext" state line cmds ret=1
  41. _arguments -C \
  42. {-d,--debug}'[Prompts before each remote command execution]' \
  43. {-e,--explain}'[Displays help (if available) for the task]:task' \
  44. {-F,--default-config}'[Always use default config, even with -f]' \
  45. {-f,--file}'[A recipe file to load. May be given more than once]:file:_files' \
  46. {-H,--long-help}'[Explain these options and environment variables]' \
  47. {-h,--help}'[Display this help message]' \
  48. {-l,--logger}'[Choose logger method. STDERR used by default]:file:_files' \
  49. {-n,--dry-run}'[Prints out commands without running them]' \
  50. {-p,--password}'[Immediately prompt for the password]' \
  51. {-q,--quiet}'[Make the output as quiet as possible]' \
  52. {-r,--preserve-roles}'[Preserve task roles]' \
  53. {-S,--set-before}'[Set a variable before the recipes are loaded]:variable' \
  54. {-s,--set}'[Set a variable after the recipes are loaded]:variable' \
  55. {-T,--tasks}'[List all tasks (matching optional PATTERN) in the loaded recipe files]:pattern' \
  56. {-t,--tool}'[Abbreviates the output of -T for tool integration]' \
  57. {-V,--version}'[Display the Capistrano version, and exit]' \
  58. {-v,--verbose}'[Be more verbose. May be given more than once]' \
  59. {-X,--skip-system-config}'[Do not load the system config file (capistrano.conf)]' \
  60. {-x,--skip-user-config}'[Do not load the user config file (.caprc)]' \
  61. '*: :->cmds' && ret=0
  62. case $state in
  63. cmds)
  64. cmds=( ${(f)"$(_call_program commands cap -T 2> /dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} )
  65. _describe -t commands 'cap command' cmds && ret=0
  66. ;;
  67. esac
  68. return ret
  69. # Local Variables:
  70. # mode: Shell-Script
  71. # sh-indentation: 2
  72. # indent-tabs-mode: nil
  73. # sh-basic-offset: 2
  74. # End:
  75. # vim: ft=zsh sw=2 ts=2 et