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 39511
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
- Date: Fri, 30 Sep 2016 06:49:41 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=w8l1o6lqd4RkyO87H+3sL+B4/4I=; b=FL+MY5 P78JqELn+9chayGv3rHbMDCPUx0iY8EILsdKcCI0cOWFN+I1TlyqbFeIn+YQT4/7 pCUn8pqDY34RUYtTQJKtsx73XKPtAJdbI7PNvcunr97w8FdXVYx+PmcECM4zY7oh vJnVWE4kESEOpLsJ/bwqhvz/uTwT0t1w0QCG4=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=w8l1o6lqd4RkyO87H+3sL+B4/4I=; b=ceasq kTcAbo46fqCoxYURQiJb7AK9gruhmRmQYKtD+k8Fb+9q8a0yolPZ2+8Kp86+vmNE wHRcpys2AHpNtorwI0w71kiPTIBPq1QqIC+Tmo3UW/36+fpGWspSxZsTF8BRH0y5 YELBln0pOI254gq3W1v9k1ZxlB4rT8N60cStO0=
- In-reply-to: <160929145022.ZM12459@torch.brasslantern.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> <160929145022.ZM12459@torch.brasslantern.com>
Bart Schaefer wrote on Thu, Sep 29, 2016 at 14:50:22 -0700:
> 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.
Would it work to declare FPATH as a private in the wrapper? (Using
zsh/param/private)
Sebastian said on IRC it wouldn't work but I don't see why.
> 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