From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15916 invoked from network); 14 Mar 2002 23:18:22 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Mar 2002 23:18:22 -0000 Received: (qmail 15991 invoked by alias); 14 Mar 2002 23:18:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16834 Received: (qmail 15962 invoked from network); 14 Mar 2002 23:18:14 -0000 Date: Thu, 14 Mar 2002 15:30:55 -0800 From: John Beppu To: zsh-workers@sunsite.dk Subject: completion newbie question Message-ID: <20020314233055.GA7934@Ax9.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i 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)