zsh-workers
 help / color / mirror / code / Atom feed
* Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
@ 2016-09-26 22:07 Sebastian Gniazdowski
  2016-09-27  7:05 ` Daniel Shahaf
  2016-09-29  7:10 ` Bart Schaefer
  0 siblings, 2 replies; 15+ messages in thread
From: Sebastian Gniazdowski @ 2016-09-26 22:07 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
with Zplugin I avoid setting FPATH by manually constructing autoload
function stub:

            eval "function $func {
                local FPATH="$PLUGIN_DIR":"${FPATH}"
                builtin autoload -X ${opts[*]}
            }"

This way one can have say 10 plugins loaded and still clean $FPATH.
What I astonishingly realized today is that functions autoloaded this
way can further use autoload builtin purely normally. FPATH visible
from the specially-autoloaded function is modified, has the required
added component, and builtin autoload works as expected (even with
<5.1 Zsh, it has a more specific manual autoload stub).

However once in 3 days I get "function definition file not found" not
found message. What could be the reason? I'm using non-optimized
zsh-5.2-dev-2 and could do some actions to track this, but what could
they be?

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-10-02 15:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 22:07 Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug Sebastian Gniazdowski
2016-09-27  7:05 ` Daniel Shahaf
2016-09-27  7:54   ` Sebastian Gniazdowski
2016-09-29  7:10 ` Bart Schaefer
2016-09-29  9:42   ` Sebastian Gniazdowski
2016-09-29 10:05     ` Sebastian Gniazdowski
2016-09-29 13:58   ` Sebastian Gniazdowski
2016-09-29 21:50     ` Bart Schaefer
2016-09-30  6:03       ` Sebastian Gniazdowski
2016-09-30 15:31         ` Bart Schaefer
2016-09-30 17:41           ` Sebastian Gniazdowski
2016-09-30 17:53             ` Sebastian Gniazdowski
2016-09-30 20:13             ` Bart Schaefer
2016-09-30  6:49       ` Daniel Shahaf
2016-09-30 18:16         ` Bart Schaefer

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).