- _rpm(): additions for rpm 4.1

This commit is contained in:
ianmacd 2002-05-05 18:20:02 +00:00
parent 9945b2b5d3
commit b985dd667f

View File

@ -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.299 2002/05/05 19:24:31 ianmacd Exp $ # $Id: bash_completion,v 1.300 2002/05/05 20:20:02 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -1017,8 +1017,8 @@ _rpm()
--checksig --recompile --rebuild --resign --addsign \ --checksig --recompile --rebuild --resign --addsign \
--rebuilddb --showrc --setperms --setugids --tarbuild \ --rebuilddb --showrc --setperms --setugids --tarbuild \
--eval --install --upgrade --query --freshen --erase \ --eval --install --upgrade --query --freshen --erase \
--verify --querytags --rmsource --rmspec --clean' -- \ --verify --querytags --rmsource --rmspec --clean \
$cur ) ) --import' -- $cur ) )
;; ;;
*) *)
COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \ COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \
@ -1081,7 +1081,8 @@ _rpm()
--ftpproxy --ftpport --justdb --httpproxy --httpport \ --ftpproxy --ftpport --justdb --httpproxy --httpport \
--noorder --relocate --badreloc --notriggers \ --noorder --relocate --badreloc --notriggers \
--excludepath --ignoresize --oldpackage --define \ --excludepath --ignoresize --oldpackage --define \
--eval --pipe --queryformat --repackage' -- $cur ) ) --eval --pipe --queryformat --repackage --nosuggests \
--nodigest --nosignature' -- $cur ) )
else else
file_glob rpm file_glob rpm
fi fi
@ -1110,7 +1111,8 @@ _rpm()
--dump --changelog --dbpath --filesbypkg \ --dump --changelog --dbpath --filesbypkg \
--define --eval --pipe --showrc --info --list \ --define --eval --pipe --showrc --info --list \
--state --docfiles --configfiles --queryformat \ --state --docfiles --configfiles --queryformat \
--conflicts --obsoletes' -- $cur ) ) --conflicts --obsoletes --nodigest \
--nosignature' -- $cur ) )
else else
file_glob rpm file_glob rpm
fi fi
@ -1126,7 +1128,8 @@ _rpm()
--eval --pipe --showrc --info --list --state \ --eval --pipe --showrc --info --list --state \
--docfiles --configfiles --queryformat \ --docfiles --configfiles --queryformat \
--conflicts --obsoletes --pkgid --hdrid \ --conflicts --obsoletes --pkgid --hdrid \
--fileid --tid' -- $cur ) ) --fileid --tid --nodigest --nosignature' \
-- $cur ) )
elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then
rpm_installed_packages rpm_installed_packages
fi fi
@ -1134,8 +1137,8 @@ _rpm()
;; ;;
-@(K|-checksig)) -@(K|-checksig))
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5' \ COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \
-- $cur ) ) --nodigest --nosignature' -- $cur ) )
else else
file_glob rpm file_glob rpm
fi fi
@ -1144,7 +1147,8 @@ _rpm()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--root --rcfile --dbpath \ COMPREPLY=( $( compgen -W '--root --rcfile --dbpath \
--nodeps --nofiles --noscripts --nomd5 --querytags \ --nodeps --nofiles --noscripts --nomd5 --querytags \
--specfile --whatrequires --whatprovides' -- $cur ) ) --specfile --whatrequires --whatprovides --nodigest \
--nosignature' -- $cur ) )
# check whether we're doing file completion # check whether we're doing file completion
elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
_filedir _filedir
@ -1193,6 +1197,14 @@ _rpm()
file_glob spec file_glob spec
fi fi
;; ;;
--@(import|dbpath|root))
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--import --dbpath --root' \
-- $cur ) )
else
_filedir
fi
;;
esac esac
return 0 return 0