From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Autoload vs regular function
Date: Fri, 18 Sep 2015 10:15:06 -0700 [thread overview]
Message-ID: <150918101506.ZM26893@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVBmBypgTYyObW83a5864dNgK4EO2mdS0aOyOpPyRkL4EA@mail.gmail.com>
On Sep 18, 8:34am, Sebastian Gniazdowski wrote:
}
} are there any pitfalls about functions declared in this way instead of
} using autoload and separate files? Is this enough to have plugin for
} e.g. antigen?
There aren't any pitfalls to this, except that the file has to be
sourced (i.e., all the functions fully defined in shell memory) unless
there is a single entry-point function whose name can be the same as
the basename of the file, and thereby trigger loading the whole thing.
E.g. the _git file that handles completion for all the git subcommands
has a whole slew of helper functions, none of which are loaded until
an attempt to complete for "git" is done, at which time the _git entry
point function loads all of them.
next prev parent reply other threads:[~2015-09-18 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 6:34 Sebastian Gniazdowski
2015-09-18 17:15 ` Bart Schaefer [this message]
2015-09-18 18:45 ` Ray Andrews
2015-09-18 21:53 ` Bart Schaefer
2015-09-19 16:23 ` simple question regarding local variables Ray Andrews
2015-09-19 16:32 ` Bart Schaefer
2015-09-19 18:21 ` Ray Andrews
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=150918101506.ZM26893@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/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).