mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-25 01:21:09 +01:00
34654: Improved rpm -q --whatprovides completion
This commit is contained in:
parent
506eaa0a63
commit
ec03a233c5
2 changed files with 13 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2015-03-05 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 34654: Completion/Redhat/Command/_rpm: complete absolute file
|
||||
names after -q --whatprovides.
|
||||
|
||||
* 34651: Src/lex.c: avoid core dump if no lexical token.
|
||||
|
||||
* Daniel Shahaf: 34647: Completion/Zsh/Function/_add-zsh-hook:
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
# complete a RPM package file name
|
||||
# package_or_file
|
||||
# the previous two together
|
||||
# file_or_package
|
||||
# an absolute path to any file (not a package file) or a package
|
||||
# tags
|
||||
# complete a tag name
|
||||
# capability
|
||||
|
@ -66,7 +68,7 @@ _rpm () {
|
|||
{-g,--group}'[query packages in one of specified groups]'
|
||||
--fileid --hdrid --pkgid --tid --querybynumber
|
||||
'--triggeredby'
|
||||
'--whatprovides'
|
||||
'--whatprovides:*:provided file:->file_or_package'
|
||||
'--whatrequires'
|
||||
)
|
||||
sopts=${selectopts%\[*}\ --specfile
|
||||
|
@ -246,6 +248,13 @@ _rpm () {
|
|||
package_or_file)
|
||||
state=package_file
|
||||
;;
|
||||
file_or_package)
|
||||
if [[ $PREFIX = /* ]]; then
|
||||
_wanted files expl 'file' _files
|
||||
else
|
||||
state=package
|
||||
fi
|
||||
;;
|
||||
package)
|
||||
if ( [[ ${+_rpms} -eq 0 ]] || _cache_invalid RPMs ) &&
|
||||
! _retrieve_cache RPMs;
|
||||
|
|
Loading…
Reference in a new issue