Recognize rpm query mode based on the --file, --group, --package, and --all long options (RedHat: #630328).
This commit is contained in:
parent
217735d807
commit
4d0b8be863
2
CHANGES
2
CHANGES
@ -15,6 +15,8 @@ bash-completion (2.x)
|
||||
* Improve /etc/init.d/* and sqlite3 completions.
|
||||
* Fix p4 completion (Alioth: #312625).
|
||||
* Add *.xsd, *.xsl, *.rng, and *.wsdl to xmllint filename completions.
|
||||
* Recognize rpm query mode based on the --file, --group, --package, and
|
||||
--all long options (RedHat: #630328).
|
||||
|
||||
[ Freddy Vulto ]
|
||||
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
|
||||
|
14
contrib/rpm
14
contrib/rpm
@ -185,7 +185,7 @@ _rpm()
|
||||
--queryformat --rcfile --requires --scripts --suggests
|
||||
--triggeredby --triggers --whatprovides --whatrequires --xml"
|
||||
|
||||
if [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
|
||||
if [ "${COMP_LINE#* -@(*([^ -])f|-file )}" != "$COMP_LINE" ]; then
|
||||
# -qf completion
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W "$opts --dbpath --fscontext \
|
||||
@ -193,10 +193,10 @@ _rpm()
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])g|-group )}" != "$COMP_LINE" ]; then
|
||||
# -qg completion
|
||||
_rpm_groups
|
||||
elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])p|-package )}" != "$COMP_LINE" ]; then
|
||||
# -qp; uninstalled package completion
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W "$opts --ftpport --ftpproxy \
|
||||
@ -209,7 +209,7 @@ _rpm()
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W "$opts --dbpath --fscontext \
|
||||
--last --root --state" -- "$cur" ) )
|
||||
elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])a|-all )}" == "$COMP_LINE" ]; then
|
||||
_rpm_installed_packages "$nodig" "$nosig"
|
||||
fi
|
||||
fi
|
||||
@ -229,11 +229,11 @@ _rpm()
|
||||
--nofiles --noscripts --nomd5 --querytags --specfile \
|
||||
--whatrequires --whatprovides" -- "$cur" ) )
|
||||
# check whether we're doing file completion
|
||||
elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])f|-file )}" != "$COMP_LINE" ]; then
|
||||
_filedir
|
||||
elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])g|-group )}" != "$COMP_LINE" ]; then
|
||||
_rpm_groups
|
||||
elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
|
||||
elif [ "${COMP_LINE#* -@(*([^ -])p|-package )}" != "$COMP_LINE" ]; then
|
||||
_filedir 'rpm'
|
||||
else
|
||||
_rpm_installed_packages "$nodig" "$nosig"
|
||||
|
Loading…
x
Reference in New Issue
Block a user