# a2x(1) completion -*- shell-script -*- proc _a2x { var cur = '', prev = '', words = '', cword = '', split = '' _init_completion -s || return match $prev { with -a|--attribute|--asciidoc-opts|--dblatex-opts|--fop-opts|-h|--help|\ --version|--xsltproc-opts return with -D|--destination-dir|--icons-dir _filedir -d return with --doctype|-d _xfunc asciidoc _asciidoc_doctype return with --stylesheet _filedir css return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" --help )' \ -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir } && complete -F _a2x a2x # ex: ts=4 sw=4 et filetype=sh