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

Re: Proof of concept mainstream plugin manager



On 23 January 2016 at 10:03, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> 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



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