Indent according to modeline.

This commit is contained in:
Ville Skyttä 2009-03-30 22:21:14 +03:00
parent 23e1851605
commit 2bb6beb8da

View File

@ -43,24 +43,24 @@ _yum()
done done
if [ -n "$special" ]; then if [ -n "$special" ]; then
case $special in case $special in
install) install)
_yum_list available _yum_list available
return 0 return 0
;; ;;
deplist|info) deplist|info)
_yum_list all _yum_list all
return 0 return 0
;; ;;
upgrade|update) upgrade|update)
_yum_list updates _yum_list updates
return 0 return 0
;; ;;
remove|erase) remove|erase)
# _rpm_installed_packages is not arch-qualified # _rpm_installed_packages is not arch-qualified
_yum_list installed _yum_list installed
return 0 return 0
;; ;;
esac esac
fi fi
@ -75,42 +75,49 @@ _yum()
fi fi
case $prev in case $prev in
list) list)
COMPREPLY=( $( compgen -W 'all available updates installed extras obsoletes recent' -- $cur ) ) COMPREPLY=( $( compgen -W 'all available updates \
;; installed extras obsoletes recent' -- $cur ) )
clean) ;;
COMPREPLY=( $( compgen -W 'packages headers metadata cache dbcache all' -- $cur ) ) clean)
;; COMPREPLY=( $( compgen -W 'packages headers metadata \
repolist) cache dbcache all' -- $cur ) )
COMPREPLY=( $( compgen -W 'all enabled disabled' -- $cur ) ) ;;
;; repolist)
localinstall|localupdate) COMPREPLY=( $( compgen -W 'all enabled disabled' \
# TODO: should not match *src.rpm -- $cur ) )
_filedir rpm ;;
;; localinstall|localupdate)
-c) # TODO: should not match *src.rpm
_filedir _filedir rpm
;; ;;
--installroot) -c)
_filedir -d _filedir
;; ;;
--enablerepo) --installroot)
COMPREPLY=( $( compgen -W '$( _yum_repolist disabled )' -- $cur ) ) _filedir -d
;; ;;
--disablerepo) --enablerepo)
COMPREPLY=( $( compgen -W '$( _yum_repolist enabled )' -- $cur ) ) COMPREPLY=( $( compgen -W '$( _yum_repolist \
;; disabled )' -- $cur ) )
--disableexcludes) ;;
COMPREPLY=( $( compgen -W '$( _yum_repolist all ) all main' -- $cur ) ) --disablerepo)
;; COMPREPLY=( $( compgen -W '$( _yum_repolist \
*) enabled )' -- $cur ) )
COMPREPLY=( $( compgen -W 'install update check-update \ ;;
upgrade remove erase list info provides whatprovides \ --disableexcludes)
clean makecache groupinstall groupupdate grouplist \ COMPREPLY=( $( compgen -W '$( _yum_repolist all ) \
groupremove groupinfo search shell resolvedep \ all main' -- $cur ) )
localinstall localupdate deplist repolist help' \ ;;
-- $cur ) ) *)
;; COMPREPLY=( $( compgen -W 'install update \
check-update upgrade remove erase list info \
provides whatprovides clean makecache \
groupinstall groupupdate grouplist \
groupremove groupinfo search shell resolvedep \
localinstall localupdate deplist repolist \
help' -- $cur ) )
;;
esac esac
} }
} && } &&
@ -121,19 +128,20 @@ complete -F _yum $filenames yum
have yum-arch && have yum-arch &&
_yum_arch() _yum_arch()
{ {
local cur local cur
COMPREPLY=() COMPREPLY=()
cur=`_get_cword` cur=`_get_cword`
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l -q' -- $cur ) ) COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l \
;; -q' -- $cur ) )
*) ;;
_filedir -d *)
;; _filedir -d
esac ;;
esac
return 0 return 0
} && } &&
complete -F _yum_arch $filenames yum-arch complete -F _yum_arch $filenames yum-arch