Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type:content-transfer-encoding;
        bh=FZHTmMQ7YzH8Qcur9Wf0Q9sLl+W81KWR8J0H5n5shd4=;
        b=mZcm9bIJs57oVp+YELVwTFtU225YTM0o7IzDpuVqGKhS3y/eVGOe0lWYPZNk3EZCfK
         4zZIM1R/IkNa3dEjDisVbPLFh0YNgdRldOHr4NSPWw7c6LVjn12uC6awo6qc8YaciIDC
         6+X4VzbJw5CQzCg1SujWD6XfzylHQd1PZRY6LI93L+b61xyejOwWam5IM76jDc3oHMdN
         Xc3ZYTI4MD+rGagrQ+PlinjGqBXco14M3E2QBQ3MmTKJhgtKy6SF9oDQ0rEyYLPgJInT
         jIjZkYyeXJT/hA/GoCVVeb8alv+DH6PYCS8x4jPhHJfj9kn7b66xanZEkOX1qJfFyZSl
         NsCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc:content-type:content-transfer-encoding;
        bh=FZHTmMQ7YzH8Qcur9Wf0Q9sLl+W81KWR8J0H5n5shd4=;
        b=K4gkNsHeN84VBvD3o1jtz4OR0MFRLXkTEj9nZW7Ka/qZdP2e//a1Z03aI7lZw1kniD
         Zejw0dJaPuDnxh6CGr+IpviUDtBcJDvwzkJr4/RUYSTu4xFSRGjYf4MD+n5N3V3/mwwZ
         yYztqIZB6K2fE5F5EcLKtczsEEpvALYrpb5uzRR4GqhABHMVOL5P5NVXDry2MqSeTut+
         Vc1ZH/HqQVTlAnDCeyzg7rS3HvCOyKhsIaY3dpJXq2swQADPVzj4omHQJwLyd7OTjogV
         eu/pwrzTk66veOctIetMk5RZV5QAkC2/bG80MAmXkEoMigQUXWLQUgSo2JSoNqtU+0A2
         uUAQ==
X-Gm-Message-State: AG10YOQ0pheL3G2dDQyMvehoBKFMCVtQvyG2lzkS5vv0TyE+3sfUVdYDI6RNC+yacl2b1xwPRB3Ku39mx8e4iA==
X-Received: by 10.112.134.165 with SMTP id pl5mr4471725lbb.126.1453632729001;
 Sun, 24 Jan 2016 02:52:09 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <160123120055.ZM14828@torch.brasslantern.com>
References: <CAKc7PVByfo51GcVkb_kYgO2D3cWYrcq-p4v8gmyfsaeWU=2new@mail.gmail.com>
 <160122173705.ZM11491@torch.brasslantern.com> <CAKc7PVCywh3fVsvFOUP3Bi27-8o1w30_E73rs8c+Zd4sOqtT8w@mail.gmail.com>
 <CAKc7PVChdTs4WzKf+amXJ9Y7zOpQVSEsVm6pmHK3FcCQy5k-Xw@mail.gmail.com>
 <CAKc7PVD-AAQ2TDQ_V06Sh15xT9=n5u+cU1WXRAk4kGAi16DqPA@mail.gmail.com>
 <CAKc7PVCXvW0PCV_pREMBqvWvVL02qFmnvc+PMcdDArrCuDMjpg@mail.gmail.com>
 <160123093602.ZM14454@torch.brasslantern.com> <160123112004.ZM14739@torch.brasslantern.com>
 <160123120055.ZM14828@torch.brasslantern.com>
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Sun, 24 Jan 2016 11:51:49 +0100
Message-ID: <CAKc7PVBXkDJ=kQS-1d+i78fcKRuNnVo=vxorhARB5OskuABgJw@mail.gmail.com>
Subject: Re: Proof of concept mainstream plugin manager
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Seq: zsh-workers 37758

On 23 January 2016 at 21:00, Bart Schaefer <schaefer@brasslantern.com> wrot=
e:

> 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 =E2=80=93 "zplugin" =E2=80=93 with sub-co=
mmands 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]=3D"-zplugin_reload_and_run ${(q)PLUGIN_DIR}
${(qq)opts} $func "'"$@"'

Source is at:

https://github.com/psprint/zplugin

Best regards,
Sebastian Gniazdowski

