# bash completion for (Debian) reportbug -*- shell-script -*- proc _reportbug { var cur = '', prev = '', words = '', cword = '' _init_completion || return match $prev { with -f|--filename|-i|--include|--mta|-o|--output _filedir return 0 with -B|--bts setglobal COMPREPLY = '( '$( compgen -W "debian guug kde mandrake help" -- \ "$cur" ) ) return 0 with -e|--editor|--mua set words = '( 'words[0] "$cur" ) set cword = '1' _command return 0 with --mode setglobal COMPREPLY = '( '$( compgen -W "novice standard expert" -- "$cur" ) ) return 0 with -S|--severity setglobal COMPREPLY = '( '$( compgen -W "grave serious important normal minor wishlist" -- "$cur" ) ) return 0 with -u|--ui|--interface setglobal COMPREPLY = '( '$( compgen -W "newt text gnome" -- "$cur" ) ) return 0 with -t|--type setglobal COMPREPLY = '( '$( compgen -W "gnats debbugs" -- "$cur" ) ) return 0 with -T|--tag setglobal COMPREPLY = '( '$( compgen -W "none woody potato sarge sarge-ignore etch etch-ignore lenny lenny-ignore sid experimental confirmed d-i fixed fixed-in-experimental fixed-upstream help l10n moreinfo patch pending security unreproducible upstream wontfix ipv6 lfs" -- "$cur" ) ) return 0 with --from-buildd setglobal COMPREPLY = '( '$( compgen -S "_" -W '$( apt-cache dumpavail | \ command grep "^Source: $cur" | sort -u | cut -f2 -d" " )' )) return 0 with * } setglobal COMPREPLY = '('$( compgen -W '--help --version --attach --no-query-bts --query-bts --bts --body --body-file --bodyfile --no-config-files --class --configure --check-available --debug --no-check-available --debconf --test --draftpath --editor --email --exit-prompt --filename --from-buildd --gnupg --gpg --path --gnus --header --include --no-check-installed --check-installed --justification --kudos --keyid --license --list-cc --maintonly --mirror --mode --mua --mta --mutt --mh --nmh --bugnumber --no-bug-script --no-cc-menu --output --offline --print --paranoid --no-paranoid --pgp --proxy --http_proxy --pseudo-header --quiet --query-only --query-source --no-query-source --realname --report-quiet --reply-to --replyto --subject --severity --smtphost --timeout --tls --smtpuser --smtppasswd --src --source --type --tag --template --verify --no-verify --no-cc --package-version --no-compress --ui --interface wnpp boot-floppies kernel bugs.debian.org cdimage.debian.org general installation-reports listarchives lists.debian.org mirrors nm.debian.org press project qa.debian.org release-notes security.debian.org tech-ctte upgrade-reports www.debian.org' \ -- "$cur" ) $( apt-cache pkgnames -- "$cur" 2> /dev/null ) ) _filedir return 0 } && complete -F _reportbug reportbug # ex: ts=4 sw=4 et filetype=sh