zsh-workers
 help / color / mirror / code / Atom feed
* completion newbie question
@ 2002-03-14 23:30 John Beppu
  2002-03-15  1:17 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: John Beppu @ 2002-03-14 23:30 UTC (permalink / raw)
  To: zsh-workers

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)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-15  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-14 23:30 completion newbie question John Beppu
2002-03-15  1:17 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).