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

_requested problem?



Z(4):akr@serein% Src/zsh -f
serein% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
serein% _tst () {
function> local expl ret=1
function> _tags a b 
function> while _tags; do
function while> _requested a expl aa compadd a && ret=0
function while> _requested b expl bb compadd b && ret=0
function while> (( $ret )) || break
function while> done
function> }
serein% zstyle :completion::complete:tst:: tag-order a
serein% tst b<TAB>

I think this should complete `bb' but it doesn't.

Is this fix correct?

Index: Completion/Core/_requested
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_requested,v
retrieving revision 1.4
diff -u -r1.4 _requested
--- Completion/Core/_requested	2000/04/25 11:00:06	1.4
+++ Completion/Core/_requested	2000/05/04 15:32:56
@@ -9,7 +9,7 @@
 
 if comptags -R "$1"; then
   if [[ $# -gt 3 ]]; then
-    _all_labels - "$gopt" "$@"
+    _all_labels - "$gopt" "$@" || return 1
   elif [[ $# -gt 1 ]]; then
     _description "$gopt" "$@"
   fi
-- 
Tanaka Akira



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