- _rpm(): RPM kan also verify uninstalled packages these days, so detect
and act on -p - _rpm(): add --querytags, --specfile, --whatrequires and --whatprovides to options that 'rpm -V' can take
This commit is contained in:
parent
69020fc682
commit
3ff74ba156
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05a
|
# bash_completion - some programmable completion functions for bash 2.05a
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.207 2002/03/22 04:29:30 ianmacd Exp $
|
# $Id: bash_completion,v 1.208 2002/03/22 16:45:42 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -922,7 +922,6 @@ _rpm()
|
|||||||
|
|
||||||
uninstalled_packages()
|
uninstalled_packages()
|
||||||
{
|
{
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--scripts --root --rcfile \
|
COMPREPLY=( $( compgen -W '--scripts --root --rcfile \
|
||||||
--whatprovides --whatrequires --requires --triggeredby \
|
--whatprovides --whatrequires --requires --triggeredby \
|
||||||
--ftpport --ftpproxy --httpproxy --httpport --provides \
|
--ftpport --ftpproxy --httpproxy --httpport --provides \
|
||||||
@ -1011,7 +1010,6 @@ _rpm()
|
|||||||
|
|
||||||
case "${COMP_WORDS[1]}" in
|
case "${COMP_WORDS[1]}" in
|
||||||
-@([iFU]*|-install|-freshen|-upgrade))
|
-@([iFU]*|-install|-freshen|-upgrade))
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--percent --force --test \
|
COMPREPLY=( $( compgen -W '--percent --force --test \
|
||||||
--replacepkgs --replacefiles --root --excludedocs \
|
--replacepkgs --replacefiles --root --excludedocs \
|
||||||
--includedocs --noscripts --rcfile --ignorearch --dbpath \
|
--includedocs --noscripts --rcfile --ignorearch --dbpath \
|
||||||
@ -1033,7 +1031,6 @@ _rpm()
|
|||||||
_filedir
|
_filedir
|
||||||
;;
|
;;
|
||||||
-@(e|-erase))
|
-@(e|-erase))
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--allmatches --noscripts \
|
COMPREPLY=( $( compgen -W '--allmatches --noscripts \
|
||||||
--notriggers --nodeps --test --repackage' -- $cur ) )
|
--notriggers --nodeps --test --repackage' -- $cur ) )
|
||||||
# return if $cur is an option
|
# return if $cur is an option
|
||||||
@ -1047,7 +1044,6 @@ _rpm()
|
|||||||
uninstalled_packages
|
uninstalled_packages
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--scripts --root --rcfile \
|
COMPREPLY=( $( compgen -W '--scripts --root --rcfile \
|
||||||
--whatprovides --whatrequires --requires --triggeredby \
|
--whatprovides --whatrequires --requires --triggeredby \
|
||||||
--ftpport --ftpproxy --httpproxy --httpport --provides \
|
--ftpport --ftpproxy --httpproxy --httpport --provides \
|
||||||
@ -1064,7 +1060,6 @@ _rpm()
|
|||||||
add_package_list
|
add_package_list
|
||||||
;;
|
;;
|
||||||
-@(K|-checksig))
|
-@(K|-checksig))
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5' -- $cur ) )
|
COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5' -- $cur ) )
|
||||||
# return if $cur is an option
|
# return if $cur is an option
|
||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
@ -1072,15 +1067,18 @@ _rpm()
|
|||||||
file_glob rpm
|
file_glob rpm
|
||||||
;;
|
;;
|
||||||
-@([Vy]*|-verify))
|
-@([Vy]*|-verify))
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--root --rcfile --dbpath --nodeps \
|
COMPREPLY=( $( compgen -W '--root --rcfile --dbpath --nodeps \
|
||||||
--nofiles --noscripts --nomd5' -- $cur ) )
|
--nofiles --noscripts --nomd5 --querytags --specfile \
|
||||||
|
--whatrequires --whatprovides' -- $cur ) )
|
||||||
# return if $cur is an option
|
# return if $cur is an option
|
||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
|
if [ "${COMP_LINE#*-*([^ ])p}" != "$COMP_LINE" ]; then
|
||||||
|
file_glob rpm
|
||||||
|
else
|
||||||
add_package_list
|
add_package_list
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
-[bt]*)
|
-[bt]*)
|
||||||
# complete on list of relevant options
|
|
||||||
COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
|
COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
|
||||||
--clean --rmsource --rmspec --test --sign --buildroot \
|
--clean --rmsource --rmspec --test --sign --buildroot \
|
||||||
--targetbuildarch --buildos --nobuild --nodeps --nodirtokens' \
|
--targetbuildarch --buildos --nobuild --nodeps --nodirtokens' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user