5
cur="${COMP_WORDS[COMP_CWORD]}"
6
prev="${COMP_WORDS[COMP_CWORD-1]}"
10
if [[ ${COMP_CWORD} > 0 ]] ; then
11
subcmd="${COMP_WORDS[1]}"
16
opts="initialize model read run-tests scaffold update \
17
call open show consume-nothing consume-memory leak-memory \
18
consume-cpu bench-read bench-fields-view-get bench-dummy bench-login \
19
bench-sale-mrp --help"
21
if [[ ${prev} == oe && ${cur} != -* ]] ; then
22
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
28
opts="--database --user --password --host --port --help"
30
if [[ ${subcmd} == call ]] ; then
31
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
37
opts="--database --addons --all-modules --exclude --no-create --help"
39
if [[ ${subcmd} == initialize ]] ; then
40
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
46
opts="--database --model --field --verbose --help"
48
if [[ ${subcmd} == model ]] ; then
49
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
55
opts="--database --model --id --field --verbose --short --help"
57
if [[ ${subcmd} == read ]] ; then
58
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
64
opts="--database --addons --module --dry-run --help"
66
if [[ ${subcmd} == run-tests ]] ; then
67
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
75
if [[ ${subcmd} == scaffold ]] ; then
76
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
80
# fallback for unimplemented completion
85
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )