zsh-workers
 help / color / mirror / code / Atom feed
From: John Beppu <beppu@ax9.org>
To: zsh-workers@sunsite.dk
Subject: completion newbie question
Date: Thu, 14 Mar 2002 15:30:55 -0800	[thread overview]
Message-ID: <20020314233055.GA7934@Ax9.org> (raw)

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)



             reply	other threads:[~2002-03-14 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14 23:30 John Beppu [this message]
2002-03-15  1:17 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020314233055.GA7934@Ax9.org \
    --to=beppu@ax9.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).