From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16293 invoked from network); 27 Aug 2001 19:26:34 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Aug 2001 19:26:34 -0000 Received: (qmail 4814 invoked by alias); 27 Aug 2001 19:26:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15713 Received: (qmail 4800 invoked from network); 27 Aug 2001 19:26:22 -0000 Date: Mon, 27 Aug 2001 12:25:54 -0700 (PDT) From: Wayne Davison X-X-Sender: To: Zsh Workers Subject: PATCH: rpm completion Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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---