mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-02 12:27:09 +08:00
mdb-export: reorder options, man, bash-completion
This commit is contained in:
@@ -6,16 +6,20 @@ _mdb_export()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
if [[ "$prev" == -@(d|-delimiter|R|-row-delimiter|q|-quote|X|-escape|D|-date-format|N|-namespace|h|-help) ]] ; then
|
||||
if [[ "$prev" == -@(d|-delimiter|R|-row-delimiter|-quote|X|-escape|N|-namespace|S|-batch-size|D|-date-format|T|-datetime-format|0|-null|h|-help) ]] ; then
|
||||
return 0
|
||||
elif [[ "$prev" == -I ]] ; then
|
||||
COMPREPLY=( $( compgen -W 'access sybase oracle postgres mysql' -- $cur ) )
|
||||
COMPREPLY=( $( compgen -W 'access sybase oracle postgres mysql sqlite' -- $cur ) )
|
||||
elif [[ "$prev" == -@(b|-bin) ]] ; then
|
||||
COMPREPLY=( $( compgen -W 'strip raw octal' -- $cur ) )
|
||||
COMPREPLY=( $( compgen -W 'strip raw octal hex' -- $cur ) )
|
||||
elif [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-H -d -R -Q -q -X -I -D -N -b -h \
|
||||
--no-header --no-quote --delimiter --row-delimiter --insert \
|
||||
--date-format --quote --escape --namespace --bin --help' -- $cur ) )
|
||||
COMPREPLY=( $( compgen -W '-H -d -R -Q -q -X -I -N -S -D -T -0 -B -h \
|
||||
--no-header --delimiter --row-delimiter \
|
||||
--no-quote --quote --escape \
|
||||
--backend --namespace --batch-size \
|
||||
--date-format --datetime-format \
|
||||
--null --bin --boolean-words
|
||||
--help' -- $cur ) )
|
||||
elif [[ "$prev" == *@(mdb|mdw|accdb) ]] ; then
|
||||
local dbname
|
||||
local tablenames
|
||||
|
||||
Reference in New Issue
Block a user