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

Re: Using _values with ->state transitions?



Bart Schaefer wrote:

> This is supposed to work, isn't it?  There appears to be code for it in
> _values, but there aren't any examples of it in the existing completion
> system. I can't get it to do anything sensible in several attempts.

Hm, the simple test:

  _values test 'a:arg:->foo' b c

  if [[ -n $state ]]; then compadd foo bar; fi

works for me.  How does this fail for you?

> The zsh/computil documentation needs some improvement.

I always think of computil as something too deeply hidden for ca. 99
percent of all users and programmers.  And most of those builtins are
useful only for the functions for which they were invented, so that
documenting them doesn't make much sense unless people would want their
own versions of _arguments and _values which behave the same as the
originals.  Maybe we should put some more comments in those functions.


Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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