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;
        bh=hR1fwzW78DBaAZTtwmfVYN60a+9sFdbcdQnazJpBDm0=;
        b=oAFBn+QVIe2rkmDD8wisw98bd9NFJboya90TXF4DOEEEYKwTTcANDPJRbNQ/MWXdsV
         hWzb77ow9uGGs3bGp96tSoTu/WsHjeEETy6t2gxpo1TyN6Uv/ztbrL4Qo8ZDw8B/4guK
         4AHGgI3p5NHVG20AGa0KkdgZtTGsNr16Wu7gyXzCBe6A3NkExCAoKkp2Wk7AIYCfIlVp
         KwPkWaplhc0TvWfSQWnScCldNVyZBpdypv7NlpUGa4B6vCsZP5S2gpyHIY2RF6REFY+N
         WrTZKYAsREkxwYlRauUI5Vg0no3WhK/kMMrBppwg8PStd/oRg3DDee6jF+1vcBzm6XdM
         U1UA==
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;
        bh=hR1fwzW78DBaAZTtwmfVYN60a+9sFdbcdQnazJpBDm0=;
        b=XGyaE3RcFimsT+gH+wWLJhb2ZMu6Jtrxs6KkVZ8G17pWpNpGTdKBzOXR73d+WE5Gbt
         amL4dB1avApTdkH1DPrxz3bVUOkdRbe9gYNNEUcf/3vuW42K9U4TYFTT9maoUetqmpqd
         rucXpN03lDNG6C6+Om9NZRGvgLIkzgP36PlSc/kkR7vyMUS4kciRVpv/EDd6KAhfmH4W
         hI4DmmyBFNgaMAsyKv0B2jrXByaPc3Mgw9ovBsqlIkrDE/B/ncAasptBj6GzUhI/WEym
         JNp2T4cxCy946vNZ6GjQ1+kgOf9zqFtS8Z6NrWVnNpiv+qfkNxDuGByfrZc6whYTxR3c
         gokw==
X-Gm-Message-State: AG10YOS8+dFIi7Q7s0Z8p5eEzhd58XgBoATZC4gBMO1x58zRBgJ97mipORTFXrmqfBhhBIH/ZBgX3RxH5iWCwg==
X-Received: by 10.25.7.10 with SMTP id 10mr8137470lfh.107.1453880072425; Tue,
 26 Jan 2016 23:34:32 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <160126203458.ZM2800@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> <20160126225010.GA15958@tarsus.local2>
 <160126203458.ZM2800@torch.brasslantern.com>
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Wed, 27 Jan 2016 08:34:12 +0100
Message-ID: <CAKc7PVB+wqm2t83obgqop3xAyXtiBSw+z_yVkhOZcFTvHzwxAQ@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
X-Seq: zsh-workers 37812

On 27 January 2016 at 05:34, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Jan 26, 10:50pm, Daniel Shahaf wrote:
> } Subject: Re: Proof of concept mainstream plugin manager
> }
> } Bart Schaefer wrote on Sat, Jan 23, 2016 at 12:00:55 -0800:
> } >         eval "function $func {
> } >           _reload_and_run ${(q)PLUGIN_DIR} ${(qq)opts} $func "'"$@"
> } >         }'
> }
> } Perhaps change $func to ${(q)func}.
>
> Sebastian has already changed that whole thing to be
>
> functions[$func]="_reload_and_run ${(q)PLUGIN_DIR} $opts $func "'"$@"

I commited your eval way to recognize it in battle (Polish idiom,
wonder if it works in English). Without quoting in ${(qq)opts}, what
you recommended earlier, I get list of all defined functions and their
bodies when shell starts (code visible in 27 sec). I tried this before
but didn't want to bother you because it's hard to express what's
happening, thus the video:

https://asciinema.org/a/eellh7umed2z45685tlhqgdqp

However, suddenly the glitch between ncd and zsh-cdr is gone. Don't
know what's happening, it was there yesterday. I guess it will be
back.

> which yes, is going to do strange things if $func contains spaces.
>
> On the other hand, the whole plugin would already be broken if $func
> contains spaces.  I'd rather not "fix" it in an unpredictable way.

What do you mean? Shouldn't I do quoting, i.e. ${(q)func} ?

Best regards,
Sebastian Gniazdowski

