Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

How completions work, do they require fpath?



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



Messages sorted by: Reverse Date, Date, Thread, Author