summaryrefslogtreecommitdiff
path: root/priv/shell-completion/bash/rebar
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-01-09 05:35:04 -0700
committerDave Smith <dizzyd@dizzyd.com>2010-01-09 05:35:04 -0700
commit407486bc62ac0d604bccf323bb4755e7a018a19d (patch)
treec698c1abe1d1eed42d15f5cfced3e3ba13f228a2 /priv/shell-completion/bash/rebar
parent49aef70f9b5a778d9430c4167ea469b1ebb8f71d (diff)
parent1e6d92a3a64036982368c23a592a9a49046adb04 (diff)
Merging mainline
Diffstat (limited to 'priv/shell-completion/bash/rebar')
-rw-r--r--priv/shell-completion/bash/rebar35
1 files changed, 35 insertions, 0 deletions
diff --git a/priv/shell-completion/bash/rebar b/priv/shell-completion/bash/rebar
new file mode 100644
index 0000000..36213ed
--- /dev/null
+++ b/priv/shell-completion/bash/rebar
@@ -0,0 +1,35 @@
+# bash completion for rebar
+
+_rebar()
+{
+ local cur prev opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ sopts="-h -v -f -j"
+ lopts=" --help --verbose --force --jobs"
+ cmdsnvars="analyze build_plt clean compile create-app \
+ create-app create-node eunit generate \
+ int_test perf_test test \
+ case= force=1 jobs= suite= verbose=1"
+
+ if [[ ${cur} == --* ]] ; then
+ COMPREPLY=( $(compgen -W "${lopts}" -- ${cur}) )
+ return 0
+ elif [[ ${cur} == -* ]] ; then
+ COMPREPLY=( $(compgen -W "${sopts}" -- ${cur}) )
+ return 0
+ else
+ COMPREPLY=( $(compgen -W "${cmdsnvars}" -- ${cur}) )
+ return 0
+ fi
+}
+complete -F _rebar rebar
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh