[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 9a7c9804f207981834cb85b7b92c3a0a30c94eaa

Ville Skyttä ville.skytta at iki.fi
Fri Jun 12 17:13:00 UTC 2009


The following commit has been merged in the master branch:
commit 42ca281cb7e8610585059b22e9ca23885c16834e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Jun 12 20:11:23 2009 +0300

    Use _split_longopt for reportbug.

diff --git a/CHANGES b/CHANGES
index d485f4b..4a65cf4 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 bee1ece..fa962ff 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 \

-- 
bash-completion



More information about the Bash-completion-commits mailing list