Subject: Re: Proof of concept mainstream plugin manager
From: Sebastian Gniazdowski <[email-masked]>
To: Bart Schaefer <[email-masked]>
Cc: Zsh hackers list <[email-masked]>
Date: Sat, 23 Jan 2016 16:54:12 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 23 January 2016 at 10:03, Sebastian Gniazdowski
<[email-masked]> wrote:
> Discouraging, but quite expected. Doing autoload -X is expected to
> generate some edge-cases on Zsh usage. If I could test say 30 plugins
> from the awesome-zsh-plugins list, and confirm they're all working,
> that would be an enabler for autoload -X, otherwise the project's
> sense is doubtful.

Tried without eval:

    for i in "$@"; do
        $i() {
            local_FPATH
            builtin autoload -X
        }
        local replace_str="local
FPATH='$ZPLUGIN_HOME/plugins/${ZPLUGIN_CURRENT_USER}--${ZPLUGIN_CURRENT_PLUGIN}'"
        functions[$i]="${functions[$i]/local_FPATH/$replace_str}"
    done

https://github.com/psprint/zplugin/commit/8bcb689b5c808b7136f0385c9506fbaa3ef83f46

But the traps are still broken. That's a puzzle, as autoload does the
same thing – constructs function with autoload -X in its body...

Best regards,
Sebastian Gniazdowski