Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
- X-seq: zsh-workers 39506
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
- Date: Thu, 29 Sep 2016 14:50:22 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=OR95w/YnD9YQ0iJcZXc4XQTloRxBR/2gZJQF4zXz3Z8=; b=ktuFs/P/sXccMiwBsrg1T/4z2LNGW3ujoUVumpSgXesYMsIOZ7Gp6ckIZY9JvDVIna TYXu2HzxD3oUkI7xGFbq4gApUc4Zc7hrQdBtVo4WjtI1Z3cCuWFzOdDDht2y1hce+SHn nIxK3yfl8Hjo+ZQmEcNcMRUiZ4Qinyw2EI546irH4/fTiVtjdrOoOT1TuaS64AD6pyfM NzS/yrHQ4LibJU1i8bBoV+qmInna5N5ry2G2lfNGkKTQSVtZILxtKuU2mHZpbtxczib4 qLLS5jMmjWDp+Ob5ck0LTD0tCGz2OzJUEwWo0XBfUhot0QZB163Zs/FFfD/rtpM2KuQl Yzkg==
- In-reply-to: <CAKc7PVCJ4RJjiV7u-9MYrZMKC-G4b5mhFM4o7rcQ7xmkEmRzvA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCXq6jQe2gF-Hb4UFBx7UXxRE=3_8Z2Oyq-H6d0LoNLAA@mail.gmail.com> <160929001004.ZM27686@torch.brasslantern.com> <CAKc7PVCJ4RJjiV7u-9MYrZMKC-G4b5mhFM4o7rcQ7xmkEmRzvA@mail.gmail.com>
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