zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: How completions work, do they require fpath?
Date: Tue, 26 Jan 2016 18:18:44 +0100	[thread overview]
Message-ID: <CAKc7PVCMPay34XS9up_CP-iZ79xPt2sZw35ngPBZZGN=_SRX_Q@mail.gmail.com> (raw)

Hello,
my current understanding of the completions is that if a file-function
with name starting with "_", and having "#compdef ..." in first line
of content, is found in $fpath, then, if compinit is run, the function
will be autoloaded and used by _main_complete. Am I missing something
here?

Does this mean that compinit should be best run once after all needed
fpath updates?

A trick to avoid fpath for regular autoload functions has emerged on
this list. Is similar trick possible for a completion? How to load one
without running compinit and most of all, without updating fpath? That
is needed for Zplugin, which is now in nice state (except maybe for
lengthy code and zparseopts issues), e.g. can unload modules (deleting
bindkeys, restoring options, removing aliases, etc.), but doesn't
support adding completions via plugins.

Best regards,
Sebastian Gniazdowski


             reply	other threads:[~2016-01-26 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 17:18 Sebastian Gniazdowski [this message]
2016-01-26 19:51 ` Sebastian Gniazdowski
2016-01-27  7:20   ` Bart Schaefer
2016-01-27  7:59     ` Sebastian Gniazdowski
2016-01-28  7:11       ` Bart Schaefer
2016-01-28  7:37         ` Sebastian Gniazdowski
2016-01-28  7:39           ` Sebastian Gniazdowski
2016-01-28 23:23             ` Bart Schaefer
2016-01-29  8:02               ` Sebastian Gniazdowski
2016-01-31 19:26                 ` Bart Schaefer
2016-01-28 19:29           ` 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='CAKc7PVCMPay34XS9up_CP-iZ79xPt2sZw35ngPBZZGN=_SRX_Q@mail.gmail.com' \
    --to=sgniazdowski@gmail.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).