# asciidoc(1) completion -*- shell-script -*- proc _asciidoc_doctype { setglobal COMPREPLY = ''( $( compgen -W 'article book manpage' -- "$cur" ) ) } proc _asciidoc { local cur prev words cword split _init_completion -s || return match $prev { with --attribute|-a return with --backend|-b setglobal COMPREPLY = ''( $( compgen -W 'docbook html4 xhtml11' -- "$cur" ) ) return with --conf-file|-f _filedir conf return with --doctype|-d _asciidoc_doctype return with --help|-h setglobal COMPREPLY = ''( $( compgen -W 'manpage syntax topics' -- "$cur" ) ) return with --out-file|-o _filedir return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" "--help manpage" )' \ -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir } && complete -F _asciidoc asciidoc asciidoc.py # ex: ts=4 sw=4 et filetype=sh