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

Re: PATCH: Completion/User/_cvs again.



Tanaka Akira wrote:

> This is new condensed version of _cvs.
> After applying the patch, you should remove Completion/Cvs.
> 
> I didn't use the state machine support "->" by _arguments because
> there are functions that is `called' such as _cvs_setup_prefix. (An
> state machine cannot represent call-return relation because it has no
> stack.)

Have you had a look at `_rpm'? It uses a (pseudo-endless-) loop with a 
`case' in it to handle the different states. The calls to `_arguments' 
then only have to use `->name' to make the code for the state `name'
to be executed in that loop (and use other completion code for the
`leafs', of course). Personally, I think that this is better readable, I 
don't want to say that everyone should use it, though.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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