#compdef cobib
#
# Completion definition for coBib.
#

setopt localoptions noshwordsplit noksharrays

typeset -g subcmds labels filters

subcmds=( ${(f)"$(cobib _list_commands)"} )
_describe -t commands "commands" subcmds

labels=( ${(f)"$(cobib _list_labels)"} )
_describe -t labels "labels" labels

filters=( ${(f)"$(cobib _list_filters)"} )
_describe -t filters "filters" filters

local -a globalargs
globalargs=(
    '(-h --help)'{-h,--help}'[show help]'
    '(-c --config)'{-c,--config}'[provide alternative config file]:_files'
)
_arguments -s $globalargs

