Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
- X-seq: zsh-workers 39450
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug
- Date: Tue, 27 Sep 2016 00:07:37 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=leXEcRsEYi6VF/90AnPvj5kq28/SlLi1ru+8psOsQuw=; b=pSuq9cJPUHeo4PzkfnczEOPM5/wR3OfUcDhgy29DoliEKFgO2XzuIbx9Ts+S2XdOv2 IhfvYj+DEbbYjbhYvpQF/u7gRrdkWcmWOltHKvYYKHYVWhtlN9XSiMxkvGxydIlDpeji v2mhLwyNyWZM2xfk5aNfolO69KsEgpkRmoItNSLDT21Duyo5zgVl2opSwIqJX/HANduA EOyU9rC9+Pui0WIc9PpaHeir2WuwrDzaIarEUdeTMiL1XpLobAu8jySjUt4d8wYgpp90 cISf/AZrvkrpY54J/03uo1Y1pv3/E/Zq3X96jdQuBK7QBBO5NofJ0vFaf31CJlKZR6g2 Aj/w==
- 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
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author