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

Ville Skyttä ville.skytta at iki.fi
Wed Sep 9 16:03:23 UTC 2009


The following commit has been merged in the master branch:
commit bb43fd63bf1c7a69a07df8190ef72b90307402cc
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Sep 8 20:28:51 2009 +0300

    Split yum into _yum and yum-arch.
    
    The plan is to move yum completion to yum upstream soon:
    http://lists.baseurl.org/pipermail/yum-devel/2009-August/005777.html

diff --git a/CHANGES b/CHANGES
index 3e50d99..b032d0d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -34,8 +34,10 @@ bash-completion (1.x)
   * Added avahi-discovered hosts to _known_hosts_real() (Debian: #518561)
 
   [ Ville Skyttä ]
-  * Split yum and yum-arch completion into contrib/yum.
-  * Install yum-arch completion only if yum-arch is installed.
+  * Split yum completion to contrib/_yum (no longer installed by default, the
+    intent is to move it to yum upstream soon).
+  * Split yum-arch completion into contrib/yum-arch, load completion only if
+    yum-arch is installed.
   * Update list of yum commands and options.
   * Add yum repolist, --enable/disablerepo, --disableexcludes, -d, -e, --color,
     and --enable/disableplugin completions.
diff --git a/Makefile.am b/Makefile.am
index d903632..bfedeff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -142,6 +142,6 @@ bashcomp_DATA = contrib/ant \
 		contrib/xrandr \
 		contrib/xz \
 		contrib/yp-tools \
-		contrib/yum
+		contrib/yum-arch
 
-EXTRA_DIST = $(sysconf_DATA) $(bashcomp_DATA) contrib/_subversion
+EXTRA_DIST = $(sysconf_DATA) $(bashcomp_DATA) contrib/_subversion contrib/_yum
diff --git a/contrib/yum b/contrib/_yum
similarity index 100%
rename from contrib/yum
rename to contrib/_yum
diff --git a/contrib/yum-arch b/contrib/yum-arch
new file mode 100644
index 0000000..d9e6b4b
--- /dev/null
+++ b/contrib/yum-arch
@@ -0,0 +1,25 @@
+# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
+# ex: ts=8 sw=8 noet filetype=sh
+
+# yum-arch(8) completion
+#
+have yum-arch &&
+_yum_arch()
+{
+	local cur
+	COMPREPLY=()
+	cur=`_get_cword`
+
+	case "$cur" in
+		-*)
+			COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l \
+				-q' -- $cur ) )
+			;;
+		*)
+			_filedir -d
+			;;
+	esac
+
+	return 0
+} &&
+complete -F _yum_arch $filenames yum-arch

-- 
bash-completion



More information about the Bash-completion-commits mailing list