Parent directory

_rebar

3055 bytes
 1#compdef rebar
 2
 3local curcontext=$curcontext state ret=1
 4typeset -ga _rebar_global_opts
 5
 6_rebar_global_opts=(
 7  '(--help -h)'{--help,-h}'[Show the program options]'
 8  '(--commands -c)'{--commands,-c}'[Show available commands]'
 9  '(--version -V)'{--version,-V}'[Show version information]'
10  '(-vvv -vv -v)'--verbose+'[Verbosity level. Default: 0]:verbosity level:(0 1 2 3)'
11  '(-vvv)-v[Slightly more verbose output]'
12  '(-vvv)-vv[More verbose output]'
13  '(-v -vv)-vvv[Most verbose output]'
14  '(--force -f)'{--force,-f}'[Force]'
15  '-D+[Define compiler macro]'
16  '(--jobs -j)'{--jobs+,-j+}'[Number of concurrent workers a command may use. Default: 3]:workers:(1 2 3 4 5 6 7 8 9)'
17  '(--config -C)'{--config,-C}'[Rebar config file to use]:files:_files'
18  '(--profile -p)'{--profile,-p}'[Profile this run of rebar]'
19  '(--keep-going -k)'{--keep-going,-k}'[Keep running after a command fails]'
20)
21
22_rebar () {
23  _arguments -C $_rebar_global_opts \
24    '*::command and variable:->cmd_and_var' \
25    && return
26
27  case $state in
28    cmd_and_var)
29      _values -S = 'variables' \
30        'clean[Clean]' \
31        'compile[Compile sources]' \
32        'create[Create skel based on template and vars]' \
33        'create-app[Create simple app skel]' \
34        'create-node[Create simple node skel]' \
35        'list-template[List available templates]' \
36        'doc[Generate Erlang program documentation]' \
37        'check-deps[Display to be fetched 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        'eunit[Run eunit tests]' \
47        'ct[Run common_test suites]' \
48        'qc[Test QuickCheck properties]' \
49        'xref[Run cross reference analysis]' \
50        'help[Show the program options]' \
51        'version[Show version information]' \
52        'apps[Application names to process]:' \
53        'case[Common Test case]:' \
54        'dump_spec[Dump reltool spec]:' \
55        'jobs[Number of workers]::workers:(0 1 2 3 4 5 6 7 8 9)' \
56        'suites[Common Test suites]::suite name:_path_files -W "(src test)" -g "*.erl(:r)"' \
57        'verbose[Verbosity level]::verbosity level:(0 1 2 3)' \
58        'appid[Application id]:' \
59        'previous_release[Previous release path]:' \
60        'nodeid[Node id]:' \
61        'root_dir[Reltool config root directory]::directory:_files -/' \
62        'skip_deps[Skip deps]::flag:(true false)' \
63        'skip_apps[Application names to not process]::flag:(true false)' \
64        'template[Template name]:' \
65        'template_dir[Template directory]::directory:_files -/' \
66        && ret=0
67      ;;
68  esac
69}
70
71_rebar
72
73# Local variables:
74# mode: shell-script
75# sh-basic-offset: 2
76# sh-indent-comment: t
77# indent-tabs-mode: nil
78# End:
79# ex: sw=2 ts=2 et filetype=sh