made rpm completion work when -p option to check uninstalled packages is not concatenated
with other options (e.g. -ql -p instead of -qlp)
This commit is contained in:
parent
c7f06a5a32
commit
47bb2a571e
@ -2,7 +2,7 @@
|
||||
#
|
||||
# <![CDATA[
|
||||
#
|
||||
# $Id: bash_completion,v 1.21 2001/07/12 05:52:25 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.22 2001/08/16 17:27:02 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -630,6 +630,20 @@ _rpm()
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
-*p*)
|
||||
# complete on list of relevant options
|
||||
COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
|
||||
whatrequires requires triggeredby ftpport ftpproxy httpproxy \
|
||||
httpport provides triggers dump changelog dbpath filesbypkg \
|
||||
define eval pipe showrc info list state docfiles \
|
||||
configfiles queryformat' ${cur_nodash#-} ) )
|
||||
dashify
|
||||
# return if $cur is an option
|
||||
[[ "$cur" == -* ]] && return 0
|
||||
# add a list of RPMS to possible completions
|
||||
file_glob rpm
|
||||
return 0
|
||||
;;
|
||||
--@(db|exclude)path|prefix|relocate|root)
|
||||
COMPREPLY=( $( compgen -d $cur ) )
|
||||
return 0
|
||||
@ -681,18 +695,20 @@ _rpm()
|
||||
file_glob rpm
|
||||
return 0
|
||||
;;
|
||||
-qp*)
|
||||
-q*)
|
||||
# complete on list of relevant options
|
||||
COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
|
||||
whatrequires requires triggeredby ftpport ftpproxy httpproxy \
|
||||
httpport provides triggers dump changelog dbpath filesbypkg \
|
||||
define eval pipe showrc info list state docfiles \
|
||||
configfiles queryformat' ${cur_nodash#-} ) )
|
||||
httpport provides triggers dump changelog dbpath specfile \
|
||||
querybynumber last filesbypkg define eval pipe showrc info \
|
||||
list state docfiles configfiles queryformat' \
|
||||
${cur_nodash#-} ) )
|
||||
dashify
|
||||
# return if $cur is an option
|
||||
[[ "$cur" == -* ]] && return 0
|
||||
# add a list of RPMS to possible completions
|
||||
file_glob rpm
|
||||
# don't complete on packages if we are querying all packages
|
||||
[[ ${COMP_WORDS[1]} == -qa* ]] && return 0
|
||||
add_package_list
|
||||
return 0
|
||||
;;
|
||||
-*f)
|
||||
@ -710,22 +726,6 @@ _rpm()
|
||||
add_package_list
|
||||
return 0
|
||||
;;
|
||||
-q*)
|
||||
# complete on list of relevant options
|
||||
COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
|
||||
whatrequires requires triggeredby ftpport ftpproxy httpproxy \
|
||||
httpport provides triggers dump changelog dbpath specfile \
|
||||
querybynumber last filesbypkg define eval pipe showrc info \
|
||||
list state docfiles configfiles queryformat' \
|
||||
${cur_nodash#-} ) )
|
||||
dashify
|
||||
# return if $cur is an option
|
||||
[[ "$cur" == -* ]] && return 0
|
||||
# don't complete on packages if we are querying all packages
|
||||
[[ ${COMP_WORDS[1]} == -qa* ]] && return 0
|
||||
add_package_list
|
||||
return 0
|
||||
;;
|
||||
-@(K|-checksig))
|
||||
# complete on list of relevant options
|
||||
COMPREPLY=( $( compgen -W 'nopgp nogpg nomd5' \
|
||||
|
Loading…
x
Reference in New Issue
Block a user