diff --git a/CHANGES b/CHANGES index d485f4b3..4a65cf47 100644 --- a/CHANGES +++ b/CHANGES @@ -65,8 +65,8 @@ bash-completion (1.x) take arguments in both "--foo bar" and "--foo=bar" formats. * Use _split_longopt to improve and clean up aspell, chgrp, chown, chkconfig, cpio, dpkg, iptables, make, mc, mii-diag, mii-tool, mkinitrd, pkg-config, - postgresql, quota, samba, smartctl, yum, and generic long option completion - (Alioth: #311398). + postgresql, quota, reportbug, samba, smartctl, yum, and generic long option + completion (Alioth: #311398). * Add chown --from and --reference value completions. * Add chgrp --reference value completion. * Do not assume all --foo= options take filenames in generic long option diff --git a/contrib/reportbug b/contrib/reportbug index bee1ece9..fa962ffb 100644 --- a/contrib/reportbug +++ b/contrib/reportbug @@ -86,12 +86,14 @@ complete -F _reportbug $filenames reportbug have querybts && _querybts() { - local cur prev + local cur prev split=false COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} + _split_longopt && split=true + case "$prev" in -B|--bts) COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \ @@ -102,12 +104,12 @@ _querybts() 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= \ + -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 \