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.

87 lines
3.4 KiB

преди 11 години
преди 12 години
преди 12 години
преди 12 години
преди 12 години
преди 12 години
  1. #compdef rebar
  2. local curcontext=$curcontext state ret=1
  3. typeset -ga _rebar_global_opts
  4. _rebar_global_opts=(
  5. '(--help -h)'{--help,-h}'[Show the program options]'
  6. '(--commands -c)'{--commands,-c}'[Show available commands]'
  7. '(--version -V)'{--version,-V}'[Show version information]'
  8. '(-vv -v)'--verbose'[Enforce verbosity level]'
  9. '(-vv)-v[Slightly more verbose output]'
  10. '(-v)-vv[More verbose output]'
  11. '(-vv -v --verbose)'{--quiet,-q}'[Quiet, only print error messages]'
  12. '(--force -f)'{--force,-f}'[Force]'
  13. '-D+[Define compiler macro]'
  14. '(--jobs -j)'{--jobs+,-j+}'[Number of concurrent workers a command may use. Default: 3]:workers:(1 2 3 4 5 6 7 8 9)'
  15. '(--config -C)'{--config,-C}'[Rebar config file to use]:files:_files'
  16. '(--profile -p)'{--profile,-p}'[Profile this run of rebar]'
  17. '(--keep-going -k)'{--keep-going,-k}'[Keep running after a command fails]'
  18. '(--recursive -r)'{--recursive,-r}'[Apply commands to subdirs and dependencies]'
  19. )
  20. _rebar () {
  21. _arguments -C $_rebar_global_opts \
  22. '*::command and variable:->cmd_and_var' \
  23. && return
  24. case $state in
  25. cmd_and_var)
  26. _values -S = 'variables' \
  27. 'clean[Clean]' \
  28. 'compile[Compile sources]' \
  29. 'create[Create skel based on template and vars]' \
  30. 'create-app[Create simple app skel]' \
  31. 'create-lib[Create simple lib skel]' \
  32. 'create-node[Create simple node skel]' \
  33. 'list-template[List avaiavle templates]' \
  34. 'doc[Generate Erlang program documentation]' \
  35. 'check-deps[Display to be fetched dependencies]' \
  36. 'prepare-deps[Fetch and build dependencies]' \
  37. 'refresh-deps[Update and build dependencies]' \
  38. 'get-deps[Fetch dependencies]' \
  39. 'update-deps[Update fetched dependencies]' \
  40. 'delete-deps[Delete fetched dependencies]' \
  41. 'list-deps[List dependencies]' \
  42. 'generate[Build release with reltool]' \
  43. 'overlay[Run reltool overlays only]' \
  44. 'generate-appups[Generate appup files]' \
  45. 'generate-upgrade[Build an upgrade package]' \
  46. 'escriptize[Create stand-alone escript executable]' \
  47. 'eunit[Run eunit tests]' \
  48. 'ct[Run common_test suites]' \
  49. 'qc[Test QuickCheck properties]' \
  50. 'xref[Run cross reference analysis]' \
  51. 'help[Show the program options]' \
  52. 'version[Show version information]' \
  53. 'apps[Application names to process]:' \
  54. 'case[Common Test case]:' \
  55. 'dump_spec[Dump reltool spec]::flag:(1)' \
  56. 'jobs[Number of workers]::workers:(0 1 2 3 4 5 6 7 8 9)' \
  57. 'suites[Common Test suites]::suite name:_path_files -W "(src test)" -g "*.erl(:r)"' \
  58. 'verbose[Verbosity level]::verbosity level:(0 1 2 3)' \
  59. 'appid[Application id]:' \
  60. 'overlay_vars[Overlay variables file]:' \
  61. 'previous_release[Previous release path]:' \
  62. 'nodeid[Node id]:' \
  63. 'root_dir[Reltool config root directory]::directory:_files -/' \
  64. 'skip_deps[Skip deps]::flag:(true false)' \
  65. 'skip_apps[Application names to not process]::flag:(true false)' \
  66. 'target_dir[Target directory]:' \
  67. 'template[Template name]:' \
  68. 'template_dir[Template directory]::directory:_files -/' \
  69. 'tests[Run eunit tests whose name starts with given string]:' \
  70. && ret=0
  71. ;;
  72. esac
  73. }
  74. _rebar
  75. # Local variables:
  76. # mode: shell-script
  77. # sh-basic-offset: 2
  78. # sh-indent-comment: t
  79. # indent-tabs-mode: nil
  80. # End:
  81. # ex: sw=2 ts=2 et filetype=sh