# bash completion for k3b -*- shell-script -*- proc _k3b { var cur = '', prev = '', words = '', cword = '' _init_completion || return match $prev { with --help*|--author|-v|--version|--license|--lang return 0 with --datacd|--audiocd|--videocd|--mixedcd|--emovixcd|--videodvd _filedir return 0 with --copydvd|--formatdvd|--videodvdrip _dvd_devices return 0 with --copycd|--erasecd|--cddarip|--videocdrip _cd_devices _dvd_devices return 0 with --cdimage|--image _filedir '@(cue|iso|toc)' return 0 with --dvdimage _filedir iso return 0 with --ao setglobal COMPREPLY = '( '$( compgen -W 'alsa arts' -- "$cur" ) ) return 0 } if [[ "$cur" == -* ]] { setglobal COMPREPLY = '( '$( compgen -W "$( _parse_help "$1" )" -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace } else { _filedir } } && complete -F _k3b k3b # ex: ts=4 sw=4 et filetype=sh