[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 063013969700f71d4edc911ac6dee7c4e3a7b744
Ville Skyttä
ville.skytta at iki.fi
Sun Sep 5 08:02:36 UTC 2010
The following commit has been merged in the master branch:
commit a26e92e6f35e80f931788f30851ad378ead39961
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Sep 5 10:44:10 2010 +0300
Improve rpm query option completions.
Add --nomanifest, --all, --file, --fileid, --ftswalk, --group, --hdrid,
--package, --pkgid, and --specfile; suggest --triggeredby, --whatprovides,
and --whatrequires only in installed package query mode.
diff --git a/CHANGES b/CHANGES
index d41dccb..1628488 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,7 @@ bash-completion (2.x)
* 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).
+ * Improve rpm query option completions.
[ Freddy Vulto ]
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
diff --git a/contrib/rpm b/contrib/rpm
index 1be2ff5..d268cab 100644
--- a/contrib/rpm
+++ b/contrib/rpm
@@ -142,7 +142,7 @@ _rpm()
-- "$cur" ) )
return 0
;;
- --define|-D)
+ --define|-D|--fileid|--hdrid|--pkgid)
# argument required but no completions available
return 0
;;
@@ -180,10 +180,9 @@ _rpm()
# options common to all query types
opts="$opts --changelog --configfiles --conflicts --docfiles
--dump --enhances --filesbypkg --filecaps --fileclass
- --filecolor --fileprovide --filerequire --filesbypkg
- --info --list --obsoletes --pipe --provides
- --queryformat --rcfile --requires --scripts --suggests
- --triggeredby --triggers --whatprovides --whatrequires --xml"
+ --filecolor --fileprovide --filerequire --filesbypkg --info
+ --list --obsoletes --pipe --provides --queryformat --rcfile
+ --requires --scripts --suggests --triggers --xml"
if [[ $COMP_LINE == *\ -@(*([^ -])f|-file )* ]]; then
# -qf completion
@@ -200,15 +199,18 @@ _rpm()
# -qp; uninstalled package completion
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "$opts --ftpport --ftpproxy \
- --httpport --httpproxy" -- "$cur" ) )
+ --httpport --httpproxy --nomanifest" -- "$cur" ) )
else
_filedir 'rpm'
fi
else
# -q; installed package completion
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W "$opts --dbpath --fscontext \
- --last --root --state" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "$opts --all --file --fileid
+ --dbpath --fscontext --ftswalk --group --hdrid --last
+ --package --pkgid --root --specfile --state
+ --triggeredby --whatprovides --whatrequires" \
+ -- "$cur" ) )
elif [[ $COMP_LINE != *\ -@(*([^ -])a|-all )* ]]; then
_rpm_installed_packages "$nodig" "$nosig"
fi
--
bash-completion
More information about the Bash-completion-commits
mailing list