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.

84 lines
3.3 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. )
  19. _rebar () {
  20. _arguments -C $_rebar_global_opts \
  21. '*::command and variable:->cmd_and_var' \
  22. && return
  23. case $state in
  24. cmd_and_var)
  25. _values -S = 'variables' \
  26. 'clean[Clean]' \
  27. 'compile[Compile sources]' \
  28. 'create[Create skel based on template and vars]' \
  29. 'create-app[Create simple app skel]' \
  30. 'create-lib[Create simple lib skel]' \
  31. 'create-node[Create simple node skel]' \
  32. 'list-template[List avaiavle templates]' \
  33. 'doc[Generate Erlang program documentation]' \
  34. 'check-deps[Display to be fetched dependencies]' \
  35. 'get-deps[Fetch dependencies]' \
  36. 'update-deps[Update fetched dependencies]' \
  37. 'delete-deps[Delete fetched dependencies]' \
  38. 'list-deps[List dependencies]' \
  39. 'generate[Build release with reltool]' \
  40. 'overlay[Run reltool overlays only]' \
  41. 'generate-appups[Generate appup files]' \
  42. 'generate-upgrade[Build an upgrade package]' \
  43. 'escriptize[Create stand-alone escript executable]' \
  44. 'eunit[Run eunit tests]' \
  45. 'ct[Run common_test suites]' \
  46. 'qc[Test QuickCheck properties]' \
  47. 'xref[Run cross reference analysis]' \
  48. 'help[Show the program options]' \
  49. 'version[Show version information]' \
  50. 'apps[Application names to process]:' \
  51. 'case[Common Test case]:' \
  52. 'dump_spec[Dump reltool spec]::flag:(1)' \
  53. 'jobs[Number of workers]::workers:(0 1 2 3 4 5 6 7 8 9)' \
  54. 'suites[Common Test suites]::suite name:_path_files -W "(src test)" -g "*.erl(:r)"' \
  55. 'verbose[Verbosity level]::verbosity level:(0 1 2 3)' \
  56. 'appid[Application id]:' \
  57. 'overlay_vars[Overlay variables file]:' \
  58. 'previous_release[Previous release path]:' \
  59. 'nodeid[Node id]:' \
  60. 'root_dir[Reltool config root directory]::directory:_files -/' \
  61. 'skip_deps[Skip deps]::flag:(true false)' \
  62. 'skip_apps[Application names to not process]::flag:(true false)' \
  63. 'target_dir[Target directory]:' \
  64. 'template[Template name]:' \
  65. 'template_dir[Template directory]::directory:_files -/' \
  66. 'tests[Run eunit tests whose name starts with given string]:' \
  67. && ret=0
  68. ;;
  69. esac
  70. }
  71. _rebar
  72. # Local variables:
  73. # mode: shell-script
  74. # sh-basic-offset: 2
  75. # sh-indent-comment: t
  76. # indent-tabs-mode: nil
  77. # End:
  78. # ex: sw=2 ts=2 et filetype=sh