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

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



I will go deep into what you wrote, I'm just overloaded with work
currently (while having no day time job hehe) and cannot much divide
focus, however I now encountered the FPATH problem (first time from
the initial email), having a debug print in place. Function uizcm is
loaded via:

                eval "function ${(q)func} {
                    local FPATH=${(qqq)PLUGIN_DIR}:${(qqq)FPATH}
                    builtin autoload -X ${(q-)opts[@]}
                }"

It has:

echo "FPATH: $FPATH" >> /tmp/reply-fp

The FPATH printed always contained required component for
further-autoloading to work, however now – the case caught – it just
didn't. And, I think this is maybe interesting – doing:

FPATH="the required fpath"

in shell, then again invoking Zle widget uizcm via Ctrl-O-Ctrl-U,
yielded working setup. So it's like if once uizcm took FPATH from the
local "FPATH" line in the emulated autoload stub, and once took it
from global scope.

Best regards,
Sebastian Gniazdowski



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