* PATCH: rpm completion
@ 2001-08-27 19:25 Wayne Davison
0 siblings, 0 replies; only message in thread
From: Wayne Davison @ 2001-08-27 19:25 UTC (permalink / raw)
To: Zsh Workers
I noticed a couple problems with the rpm completion. The first one is
that the verify option does not understand the package-specification
options, nor does it complete package filenames with -p. I believe
that the attached patch fixes this properly. (FYI, yes it is legal to
do "rpm -Vf /path/to/file" to verify the package associated with that
file, to do "rpm -Vp some.rpm" to verify the files in the uninstalled
package file against what's installed on the system, and to use
"rpm -Va" to verify all installed packages.)
One other thing I noticed was that "rpm --clean spec" does not complete
filenames in the spec-file position. Not even the man page mentions
that this is legal, but using "rpm -ba --clean spec" is the same as
doing "rpm -ba spec" followed by "rpm --clean spec". I didn't try to
fix this one, since I don't know how to program the new completion
system in any meaningful way yet.
..wayne..
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Completion/Redhat/Command/_rpm
--- Completion/Redhat/Command/_rpm 2001/08/15 13:33:52 1.4
+++ Completion/Redhat/Command/_rpm 2001/08/27 19:14:05
@@ -142,9 +142,9 @@
verify)
_arguments -s \
'(-y --verify)-V' '(-V --verify)-y' '(-y -V)--verify' \
- "${commonopts[@]}" "${pathopts[@]}" \
+ "${commonopts[@]}" "${packageopts[@]}" "${pathopts[@]}" \
--no{deps,md5,files} \
- '*:RPM package:->package' && ret=0
+ '*:RPM package:->package_or_file' && ret=0
;;
upgrade)
tmp=( '(--upgrade)-U' '(-U)--upgrade' '(--force)--oldpackage' )
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-08-27 19:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-27 19:25 PATCH: rpm completion Wayne Davison
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).