about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorAdam Spiers <adamspiers@users.sourceforge.net>2000-04-29 15:53:22 +0000
committerAdam Spiers <adamspiers@users.sourceforge.net>2000-04-29 15:53:22 +0000
commit0d437ea7292a090ebdb2703185cc66b9c916a83e (patch)
treecfca03346e96bdbe264f7ebe8ad868523c89cc67 /Completion/Linux
parent84963428416ba7cd8518d82b1899178178dfc1b4 (diff)
downloadzsh-0d437ea7292a090ebdb2703185cc66b9c916a83e.tar.gz
zsh-0d437ea7292a090ebdb2703185cc66b9c916a83e.tar.xz
zsh-0d437ea7292a090ebdb2703185cc66b9c916a83e.zip
11017: Completion/Linux/_rpm: fixes for --rmsource and --recompile
options, and for breakage caused by 10772
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/_rpm17
1 files changed, 11 insertions, 6 deletions
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index 6db97889a..6fa9d0098 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -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)