Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: bugfixes for _rpm
- X-seq: zsh-workers 11017
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: bugfixes for _rpm
- Date: Sat, 29 Apr 2000 16:46:40 +0100
- In-reply-to: <1000426172340.ZM20629@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Wed, Apr 26, 2000 at 05:23:39PM +0000
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000426173759.A11067@xxxxxxxxxxxxxxxxxxxxxxx> <1000426172340.ZM20629@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Apr 26, 5:37pm, Adam Spiers wrote:
> } Subject: PATCH: bugfixes for _rpm
> }
> } --rmsource completion still doesn't work exactly as I'd like it to
> } after the patch is applied - it completes all files, not just *.spec.
> } Have I done something wrong, or do I have to finally take the plunge
> } and try to understand the file-patterns style?
>
> You've done something wrong.
>
> } + spec_file)
> } + _wanted specfiles expl 'spec file' \
> } + _files "$expl[@]" -g \*.spec && ret=0
> } + ;;
This does it right. It also fixes 10772, which broke _rpm in other
ways by putting the target) case in the middle of two continuation
cases.
I haven't fixed _hash yet.
Index: Completion/Linux/_rpm
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Linux/_rpm,v
retrieving revision 1.6
diff -u -r1.6 _rpm
--- Completion/Linux/_rpm 2000/04/17 08:42:18 1.6
+++ Completion/Linux/_rpm 2000/04/29 15:37:12
@@ -70,8 +70,9 @@
'--erase:*:uninstall:->uninstall' \
-'b+[build mode (spec file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build:->build_b' \
-'t+[build mode (tar file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build:->build_t' \
- --{rmsource,recompile,resign,addsign}':*:RPM package:->package' \
- '--rebuild:*:Src RPM files:->package_src' \
+ --{resign,addsign}':*:RPM package:->package' \
+ '--rmsource:*:spec file:->spec_file' \
+ --{rebuild,recompile}':*:Src RPM files:->package_src' \
'-K+[signature check mode]:*:sigcheck:->sigcheck' \
'--checksig:*:sigcheck:->sigcheck' \
'--rebuilddb:*:rebuild:->rebuild' && ret=0
@@ -187,24 +188,28 @@
'--dbpath:RPM database path:_files -/' \
'*:RPM source package file:->package_file' && ret=0
;;
- package_or_file)
- state=package_file
- ;&
target)
_wanted target expl 'Target platforms' \
compadd $(_call target rpm --showrc |grep 'compatible archs'|sed 's/.*: //') && ret=0
;;
+ package_or_file)
+ state=package_file
+ ;&
package)
_wanted packages expl 'RPM package' \
compadd -M 'r:|-=* r:|=*' - $(_call packages rpm -qa) && ret=0
;;
+ spec_file)
+ _wanted specfiles expl 'spec file' \
+ _files -g \*.spec && ret=0
+ ;;
package_file)
if compset -P ftp://; then
_hosts -S/ && ret=0
else
_alternative \
'files:RPM package file:_files -g \*.\(\#i\)rpm' \
- 'prefixes:ftp URL prefix:compadd ftp://' && ret=0
+ 'prefixes:ftp URL prefix:compadd ftp://' && ret=0
fi
;;
package_src)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author