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

_next_tags doesn't cycle?



Hello,

I’m trying to better understand the completion system by building some primitive completions and seeing what they do.  It seems to me _next_tags doesn’t cycle through tags as I’d expect and I’m wondering what I’m doing wrong.

So I have this in a file named _zeke in my fpath:

#compdef zeke

local ret=1
_tags foo bar baz
while _tags; do
  if _requested bar; then
    compadd heres_bar
    ret=0
  fi
  if _requested foo; then
    compadd heres_foo
    ret=0
  fi
  if _requested baz; then
    compadd heres_baz
    ret=0
  fi
  [[ $ret -eq 0 ]] && break
done
return ret

and in my shell I do

zstyle ':completion::complete:zeke::' tag-order foo bar baz

So, I would think that in my shell if I type “zeke” followed by a space, then ctrl-D to bring up a list of completions, then "ctrl-X n” to invoke _next_tags, it would cycle through “heres_foo”, “heres_bar”, and “heres_baz”.  But I get no cycling.  Instead all I get is the completion for “heres_foo” with no change when I press “ctrl-X n”.

Thanks for any help!  —Omari



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