diff options
Diffstat (limited to 'completions/reportbug')
-rw-r--r-- | completions/reportbug | 56 |
1 files changed, 5 insertions, 51 deletions
diff --git a/completions/reportbug b/completions/reportbug index 0c44bd68..aa5ac3e5 100644 --- a/completions/reportbug +++ b/completions/reportbug @@ -1,12 +1,9 @@ -# bash completion for (Debian) reportbug package +# bash completion for (Debian) reportbug -*- shell-script -*- -have reportbug && _reportbug() { - local cur prev - - COMPREPLY=() - _get_comp_words_by_ref cur prev + local cur prev words cword + _init_completion || return case $prev in -f|--filename|-i|--include|--mta|-o|--output) @@ -19,8 +16,8 @@ _reportbug() return 0 ;; -e|--editor|--mua) - COMP_WORDS=(COMP_WORDS[0] "$cur") - COMP_CWORD=1 + words=(words[0] "$cur") + cword=1 _command return 0 ;; @@ -86,47 +83,4 @@ _reportbug() } && complete -F _reportbug reportbug -have querybts && -_querybts() -{ - local cur prev split=false - - COMPREPLY=() - _get_comp_words_by_ref cur prev - - _split_longopt && split=true - - case $prev in - -B|--bts) - COMPREPLY=( $( compgen -W "debian guug kde mandrake help" \ - -- "$cur" )) - return 0 - ;; - -u|--ui|--interface) - COMPREPLY=($( compgen -W "newt text gnome" -- "$cur" )) - return 0 - ;; - esac - - $split && return 0 - - COMPREPLY=($( compgen -W '-h --help -v --version -A --archive \ - -B --bts -l --ldap --no-ldap --proxy --http_proxy \ - -s --source -w --web -u --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) ) -} && -complete -F _querybts querybts - -# Local variables: -# mode: shell-script -# sh-basic-offset: 4 -# sh-indent-comment: t -# indent-tabs-mode: nil -# End: # ex: ts=4 sw=4 et filetype=sh |