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

David Paleino d.paleino at gmail.com
Fri Jun 5 19:42:28 UTC 2009


The following commit has been merged in the master branch:
commit b5029b732e1833ffce5f1c8b9565be661869c0f5
Author: David Paleino <d.paleino at gmail.com>
Date:   Fri Jun 5 21:42:14 2009 +0200

    Split dselect completion to contrib/dselect

diff --git a/CHANGES b/CHANGES
index e377f1a..9276a86 100644
--- a/CHANGES
+++ b/CHANGES
@@ -30,6 +30,7 @@ bash-completion (1.x)
   * Split dpkg-related completions to contrib/dpkg (and re-enable usage
     of grep-status if available)
   * Split gcc completion to contrib/gcc
+  * Split dselect completion to contrib/dselect
 
   [ Ville Skyttä ]
   * Split yum and yum-arch completion into contrib/yum.
diff --git a/Makefile.am b/Makefile.am
index b7d615c..f22cfa2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,6 +30,7 @@ bashcomp_DATA = contrib/ant \
 		contrib/dhclient \
 		contrib/dict \
 		contrib/dpkg \
+		contrib/dselect \
 		contrib/dsniff \
 		contrib/findutils \
 		contrib/freeciv \
diff --git a/bash_completion b/bash_completion
index feacb5c..ec6f5c3 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1461,42 +1461,6 @@ _cardctl()
 } &&
 complete -F _cardctl cardctl
 
-# Debian Linux dselect(8) completion.
-#
-have dselect &&
-_dselect()
-{
-	local cur prev
-
-	COMPREPLY=()
-	cur=`_get_cword`
-	prev=${COMP_WORDS[COMP_CWORD-1]}
-
-	case "$prev" in
-	     --admindir)
-		  _filedir -d
-		  return 0
-		  ;;
-
-	     -@(D|debug))
-		  _filedir
-		  return 0
-		  ;;
-	esac
-
-	if [[ "$cur" == -* ]]; then
-	    COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
-				  --license --expert --debug' -- $cur ) )
-	else
-	    COMPREPLY=( $( compgen -W 'access update select install config \
-				  remove quit' -- $cur ) )
-	fi
-
-
-	return 0
-} &&
-complete -F _dselect $filenames dselect
-
 # PINE address-book completion
 #
 have pine &&
diff --git a/contrib/dselect b/contrib/dselect
new file mode 100644
index 0000000..8630127
--- /dev/null
+++ b/contrib/dselect
@@ -0,0 +1,35 @@
+# Debian Linux dselect(8) completion.
+#
+have dselect &&
+_dselect()
+{
+	local cur prev
+
+	COMPREPLY=()
+	cur=`_get_cword`
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	case "$prev" in
+	     --admindir)
+		  _filedir -d
+		  return 0
+		  ;;
+
+	     -@(D|debug))
+		  _filedir
+		  return 0
+		  ;;
+	esac
+
+	if [[ "$cur" == -* ]]; then
+	    COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
+				  --license --expert --debug' -- $cur ) )
+	else
+	    COMPREPLY=( $( compgen -W 'access update select install config \
+				  remove quit' -- $cur ) )
+	fi
+
+
+	return 0
+} &&
+complete -F _dselect $filenames dselect

-- 
bash-completion



More information about the Bash-completion-commits mailing list