1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

11017: Completion/Linux/_rpm: fixes for --rmsource and --recompile

options, and for breakage caused by 10772
This commit is contained in:
Adam Spiers 2000-04-29 15:53:22 +00:00
parent 8496342841
commit 0d437ea729
2 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2000-04-29 Adam Spiers <adam@spiers.net>
* 11017: Completion/Linux/_rpm: fixes for --rmsource and
--recompile options, and for breakage caused by 10772
2000-04-28 Bart Schaefer <schaefer@zsh.org>
* 11015: Src/builtin.c, Src/hashtable.c, Src/signals.c:

View file

@ -70,8 +70,9 @@ _arguments -C -s \
'--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 @@ while [[ -n "$state" ]]; do
'--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)