Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: bugfixes for _rpm and _hash
- X-seq: zsh-workers 10943
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: bugfixes for _rpm and _hash
- Date: Wed, 26 Apr 2000 18:49:05 +0100
- In-reply-to: <20000426183501.A11738@xxxxxxxxxxxxxxxxxxxxxxx>; from adam@xxxxxxxxxx on Wed, Apr 26, 2000 at 06:35:01PM +0100
- 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> <20000426183501.A11738@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Adam Spiers (adam@xxxxxxxxxx) wrote:
> Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> > Take that "$expl[@]" out of there, you don't need it and it's ultimately
> > causing an empty string as an argument to _files.
>
> Ahah. In that case is _hash wrong? It has
>
> _wanted -C value values expl 'executable file' _files "$expl[@]" -g '*(-*)'
>
> which seems to exhibit the same problem.
As soon as someone confirms this, I'll apply this patch, which makes
things work as expected.
Index: Completion/Builtins/_hash
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_hash,v
retrieving revision 1.2
diff -u -r1.2 _hash
--- Completion/Builtins/_hash 2000/04/11 07:57:56 1.2
+++ Completion/Builtins/_hash 2000/04/26 17:38:04
@@ -10,7 +10,7 @@
compadd -q -S '=' - "${(@k)nameddirs}"
fi
elif compset -P 1 '*='; then
- _wanted -C value values expl 'executable file' _files "$expl[@]" -g '*(-*)'
+ _wanted -C value values expl 'executable file' _files -g '*(-*)'
else
_wanted -C name commands expl command compadd -q -S '=' - "${(@k)commands}"
fi
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/26 17:38:04
@@ -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
@@ -198,13 +199,17 @@
_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