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

completion newbie question



I've been trying to learn how to write completions, and
I came across an idiom in _cvs that seems unnecessary.
Before every function definition, there is a guard that
looks like:

    (( $+functions[_cvs_command] )) ||  # ...define function

Maybe I'm wrong, but once _cvs gets loaded, all the other
auxiliary functions in the same file will be loaded, too.
Under normal circumstances, the condition inside the guard
will be false the first time through, and there won't ever
be a second time through, because _cvs won't ever be loaded
again during that session.

What am I missing?



(...otherwise, _cvs is really impressive to me for its
 completeness.  I definitely learned a few new things
 about CVS by looking at the completions for it)




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