Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: rpm completion
- X-seq: zsh-workers 15713
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: rpm completion
- Date: Mon, 27 Aug 2001 12:25:54 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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---
Messages sorted by:
Reverse Date,
Date,
Thread,
Author