# a2x(1) completion -*- shell-script -*- proc _a2x { local cur prev words cword split _init_completion -s || return case (prev) { -a|--attribute|--asciidoc-opts|--dblatex-opts|--fop-opts|-h|--help|\ --version|--xsltproc-opts { return } -D|--destination-dir|--icons-dir { _filedir -d return } --doctype|-d { _xfunc asciidoc _asciidoc_doctype return } --stylesheet { _filedir css return } } $split && return if [[ $cur == -* ]] { setvar 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