Debian Codegraph @

src/util/bash-completion/mdb-schema

raw
1 #-*- mode: shell-script;-*-
2 _mdb_schema()
3 {
4 local cur prev words cword split
5 _init_completion -s || return
6
7 if [[ "$prev" == -@(T|-table|N|-namespace) ]] ; then
8 return 0
9 fi
10
11 $split && return
12
13 if [[ "$cur" == -* ]]; then
14 COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
15 [[ $COMPREPLY == *= ]] && compopt -o nospace
16 elif [[ "$prev" == @(*mdb|*mdw|*accdb) ]]; then
17 COMPREPLY=( $( compgen -W 'access sybase oracle postgres mysql sqlite' -- "$cur" ) )
18 else
19 _filedir '@(mdb|mdw|accdb)'
20 fi
21 return 0
22 } &&
23 complete -F _mdb_schema mdb-schema