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

Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug



On Sep 29,  3:58pm, Sebastian Gniazdowski wrote:
}
} Turns out a normal fpath-extending loading support is needed for
} Zplugin, unless a creative solution is found

Your autoload wrapper that sets up the "local FPATH" needs to store
the FPATH value for each module somewhere, e.g., in a has indexed
on the module name, and then recall that every time another autoload
occurs from inside a function that was loaded from that module.

Whether it's possible to find that the name of the module at the
necessary time, is a harder question.  In 5.3 "whence -v" will
reliably give you the path from which the function was loaded, but
it may not in earlier versions.



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