Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: complete rpm --{resign,addsign} in local



On Jun 4,  9:37pm, Chmouel Boudjnah wrote:
} Subject: PATCH: complete rpm --{resign,addsign} in local
}
} --{rebuild,recompile} is always local files :
                                  ^^^^^

} +  --{resign,addsign}':*:RPM package:->package_file' \
                                         ^^^^^^^^^^^^

The package_file state will complete remote files via ftp URLs, as well as
local files.  If it really is the case that you can only rebuild a local
package file, the _rpm machine needs another state.

Meanwhile, it ought to complete http URLs as well as ftp.

Index: Completion/Linux/_rpm
===================================================================
@@ -211,12 +211,12 @@
         _files -g \*.spec && ret=0
     ;;
   package_file)
-    if compset -P ftp://; then
+    if compset -P '(f|ht)tp://'; then
       _hosts -S/ && ret=0
     else
       _alternative \
           'files:RPM package file:_files -g \*.\(\#i\)rpm' \
-          'prefixes:ftp URL prefix:compadd ftp://' && ret=0
+          'prefixes:URL prefix:compadd ftp:// http://' && ret=0
     fi
     ;;
   package_src)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author