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
This commit is contained in:
Ville Skyttä 2009-09-08 20:28:51 +03:00
parent 81458b0b9f
commit bb43fd63bf
4 changed files with 31 additions and 4 deletions

View File

@ -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.

View File

@ -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

25
contrib/yum-arch Normal file
View File

@ -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