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

Re: Proof of concept mainstream plugin manager



On 23 January 2016 at 21:00, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> If that's the approach, it might be useful to do something like this:
>
>     _reload_and_run () {

The code works very well, which is extremely good, encouraging news. I
will now move to test ~30 plugins from awesome-zsh-plugins github
page, at the moment I tested my 3 plugins which are quite fancy (they
use traps for example), and everything works fine.

I've updated zplugin and commited your code, to the project that's
under MIT license. Is this fine? Maybe you would want to participate
directly? Or you Daniel? I imagine that currently the project is at
rapid iterations stage and quick direct commits would be good.

Changes I've made:
- shadowed zstyle
- reports are now gathered per-plugin, in associative array containing
strings with \n in them
- typeset -gH
- colors
- shadowing functions start with "-", private functions with "_", user
accesible functions with no prefix (however, we would probably want
only one user accessible function – "zplugin" – with sub-commands such
as load, show-report, etc.)

Here is how it currently works:

https://asciinema.org/a/753uyr5uv0sphp4y9srq59vcv

>         eval "function $func {
>           _reload_and_run ${(q)PLUGIN_DIR} ${(qq)opts} $func "'"$@"
>         }'

Changed the eval to this, not sure if eval here was any risk, but this
also looks very fine:

        functions[$func]="-zplugin_reload_and_run ${(q)PLUGIN_DIR}
${(qq)opts} $func "'"$@"'

Source is at:

https://github.com/psprint/zplugin

Best regards,
Sebastian Gniazdowski



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