summaryrefslogtreecommitdiff
path: root/priv/shell-completion/zsh/_rebar
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-04-03 15:01:20 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-04-03 15:01:20 -0400
commit9753617471e560dbf45b3dd1f2475155a10006a8 (patch)
tree296afbe7b5b5aa5015392cab2f0bedfa5fff7d69 /priv/shell-completion/zsh/_rebar
parentf51ac0ba8ec126750e46b01a3993b00e3776a36f (diff)
parent0ceb3bd6ce302af9a1997a01a3ec6e5408ada364 (diff)
Merge pull request #304 from ingwinlu/fix_shell_completions
impl shell completion
Diffstat (limited to 'priv/shell-completion/zsh/_rebar')
-rw-r--r--priv/shell-completion/zsh/_rebar87
1 files changed, 0 insertions, 87 deletions
diff --git a/priv/shell-completion/zsh/_rebar b/priv/shell-completion/zsh/_rebar
deleted file mode 100644
index 0218f9e..0000000
--- a/priv/shell-completion/zsh/_rebar
+++ /dev/null
@@ -1,87 +0,0 @@
-#compdef rebar
-
-local curcontext=$curcontext state ret=1
-typeset -ga _rebar_global_opts
-
-_rebar_global_opts=(
- '(--help -h)'{--help,-h}'[Show the program options]'
- '(--commands -c)'{--commands,-c}'[Show available commands]'
- '(--version -V)'{--version,-V}'[Show version information]'
- '(-vv -v)'--verbose'[Enforce verbosity level]'
- '(-vv)-v[Slightly more verbose output]'
- '(-v)-vv[More verbose output]'
- '(-vv -v --verbose)'{--quiet,-q}'[Quiet, only print error messages]'
- '(--force -f)'{--force,-f}'[Force]'
- '-D+[Define compiler macro]'
- '(--jobs -j)'{--jobs+,-j+}'[Number of concurrent workers a command may use. Default: 3]:workers:(1 2 3 4 5 6 7 8 9)'
- '(--config -C)'{--config,-C}'[Rebar config file to use]:files:_files'
- '(--profile -p)'{--profile,-p}'[Profile this run of rebar]'
- '(--keep-going -k)'{--keep-going,-k}'[Keep running after a command fails]'
- '(--recursive -r)'{--recursive,-r}'[Apply commands to subdirs and dependencies]'
-)
-
-_rebar () {
- _arguments -C $_rebar_global_opts \
- '*::command and variable:->cmd_and_var' \
- && return
-
- case $state in
- cmd_and_var)
- _values -S = 'variables' \
- 'clean[Clean]' \
- 'compile[Compile sources]' \
- 'create[Create skel based on template and vars]' \
- 'create-app[Create simple app skel]' \
- 'create-lib[Create simple lib skel]' \
- 'create-node[Create simple node skel]' \
- 'list-template[List avaiavle templates]' \
- 'doc[Generate Erlang program documentation]' \
- 'check-deps[Display to be fetched dependencies]' \
- 'prepare-deps[Fetch and build dependencies]' \
- 'refresh-deps[Update and build dependencies]' \
- 'get-deps[Fetch dependencies]' \
- 'update-deps[Update fetched dependencies]' \
- 'delete-deps[Delete fetched dependencies]' \
- 'list-deps[List dependencies]' \
- 'generate[Build release with reltool]' \
- 'overlay[Run reltool overlays only]' \
- 'generate-appups[Generate appup files]' \
- 'generate-upgrade[Build an upgrade package]' \
- 'escriptize[Create stand-alone escript executable]' \
- 'eunit[Run eunit tests]' \
- 'ct[Run common_test suites]' \
- 'qc[Test QuickCheck properties]' \
- 'xref[Run cross reference analysis]' \
- 'help[Show the program options]' \
- 'version[Show version information]' \
- 'apps[Application names to process]:' \
- 'case[Common Test case]:' \
- 'dump_spec[Dump reltool spec]::flag:(1)' \
- 'jobs[Number of workers]::workers:(0 1 2 3 4 5 6 7 8 9)' \
- 'suites[Common Test suites]::suite name:_path_files -W "(src test)" -g "*.erl(:r)"' \
- 'verbose[Verbosity level]::verbosity level:(0 1 2 3)' \
- 'appid[Application id]:' \
- 'overlay_vars[Overlay variables file]:' \
- 'previous_release[Previous release path]:' \
- 'nodeid[Node id]:' \
- 'root_dir[Reltool config root directory]::directory:_files -/' \
- 'skip_deps[Skip deps]::flag:(true false)' \
- 'skip_apps[Application names to not process]::flag:(true false)' \
- 'target_dir[Target directory]:' \
- 'template[Template name]:' \
- 'template_dir[Template directory]::directory:_files -/' \
- 'tests[Run eunit tests whose name starts with given string]:' \
- && ret=0
- ;;
- esac
-}
-
-_rebar
-
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 2
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
-# ex: sw=2 ts=2 et filetype=sh