Debian Codegraph @

priv/shell-completion/zsh/_rebar

raw
1 #compdef rebar
2
3 local curcontext=$curcontext state ret=1
4 typeset -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 '(-vv -v)'--verbose'[Enforce verbosity level]'
11 '(-vv)-v[Slightly more verbose output]'
12 '(-v)-vv[More verbose output]'
13 '(-vv -v --verbose)'{--quiet,-q}'[Quiet, only print error messages]'
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 '(--recursive -r)'{--recursive,-r}'[Apply commands to subdirs and dependencies]'
21 )
22
23 _rebar () {
24 _arguments -C $_rebar_global_opts \
25 '*::command and variable:->cmd_and_var' \
26 && return
27
28 case $state in
29 cmd_and_var)
30 _values -S = 'variables' \
31 'dialyze[Analyze the code for discrepancies]' \
32 'build-plt[Build project-specific PLT]' \
33 'check-plt[Check the plt for consistency and rebuild it if it is not up-to-date]' \
34 'clean[Clean]' \
35 'compile[Compile sources]' \
36 'create[Create skel based on template and vars]' \
37 'create-app[Create simple app skel]' \
38 'create-lib[Create simple lib skel]' \
39 'create-node[Create simple node skel]' \
40 'list-template[List available templates]' \
41 'doc[Generate Erlang program documentation]' \
42 'check-deps[Display to be fetched dependencies]' \
43 'prepare-deps[Fetch and build dependencies]' \
44 'refresh-deps[Update and build dependencies]' \
45 'get-deps[Fetch dependencies]' \
46 'update-deps[Update fetched dependencies]' \
47 'delete-deps[Delete fetched dependencies]' \
48 'list-deps[List dependencies]' \
49 'generate[Build release with reltool]' \
50 'overlay[Run reltool overlays only]' \
51 'generate-appups[Generate appup files]' \
52 'generate-upgrade[Build an upgrade package]' \
53 'escriptize[Create stand-alone escript executable]' \
54 'eunit[Run eunit tests]' \
55 'ct[Run common_test suites]' \
56 'qc[Test QuickCheck properties]' \
57 'xref[Run cross reference analysis]' \
58 'help[Show the program options]' \
59 'version[Show version information]' \
60 'apps[Application names to process]:' \
61 'case[Common Test case]:' \
62 'dump_spec[Dump reltool spec]::flag:(1)' \
63 'jobs[Number of workers]::workers:(0 1 2 3 4 5 6 7 8 9)' \
64 'suites[Common Test suites]::suite name:_path_files -W "(src test)" -g "*.erl(:r)"' \
65 'verbose[Verbosity level]::verbosity level:(0 1 2 3)' \
66 'libid[Library id]:' \
67 'appid[Application id]:' \
68 'nodeid[Node id]:' \
69 'overlay_vars[Overlay variables file]:' \
70 'previous_release[Previous release path]:' \
71 'profiler[Select profiler]::flag:(fprof eflame)' \
72 'root_dir[Reltool config root directory]::directory:_files -/' \
73 'shell[Start a shell similar to erl -pa ebin -pa deps/*/ebin]' \
74 'skip_deps[Skip deps]::flag:(true false)' \
75 'skip_apps[Application names to not process]::flag:(true false)' \
76 'target_dir[Target directory]:' \
77 'template[Template name]:' \
78 'template_dir[Template directory]::directory:_files -/' \
79 'tests[Run eunit tests whose name starts with given string]:' \
80 && ret=0
81 ;;
82 esac
83 }
84
85 _rebar
86
87 # Local variables:
88 # mode: shell-script
89 # sh-basic-offset: 2
90 # sh-indent-comment: t
91 # indent-tabs-mode: nil
92 # End:
93 # ex: sw=2 ts=2 et filetype=sh