From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8682 invoked by alias); 30 Sep 2015 03:54:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20663 Received: (qmail 8536 invoked from network); 30 Sep 2015 03:54:24 -0000 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 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=62AtbbSsrca3scplPJj5lw==:117 a=62AtbbSsrca3scplPJj5lw==:17 a=IkcTkHD0fZMA:10 a=Ye9q-bpsAAAA:8 a=cUhmSoUjVNEd3RrOf1wA:9 a=QEXdDO2ut3YA:10 Message-id: <560B55E2.9050606@eastlink.ca> Date: Tue, 29 Sep 2015 20:24:18 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: wheels within wheels References: <55FAE223.2080502@eastlink.ca> <150917103419.ZM10067@torch.brasslantern.com> <150918171441.ZM27212@torch.brasslantern.com> <55FD7982.9030505@eastlink.ca> <150919092922.ZM28214@torch.brasslantern.com> <55FDA5D3.9020304@eastlink.ca> <150919142243.ZM23634@torch.brasslantern.com> <55FE04AD.1070304@eastlink.ca> <150919224120.ZM4736@torch.brasslantern.com> <55FF3F7E.4060906@eastlink.ca> <150920211840.ZM31871@torch.brasslantern.com> <5600386E.7060201@eastlink.ca> <150921111746.ZM388@torch.brasslantern.com> <56006401.5060902@eastlink.ca> <150921201943.ZM707@torch.brasslantern.com> <560B1BE7.8020507@eastlink.ca> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit On 09/29/2015 07:55 PM, Kurtis Rader wrote: > http://unix.stackexchange.com/questions/94129/is-there-something-like-closures-for-zsh Never heard of it. But thanks for the link. I forget that shells aren't 'real' languages. Nuts, I'm even getting used to not declaring variables. As Bart once said, shells are a glue for various command line operations. > In short: don't do it. I wouldn't, unless there was some sort of wonderful reason to, which is what I'm asking. > You can see for yourself that nested, named, > function definitions are in fact globally visible (as opposed to visible > only to the function in which they're defined) by executing the following > script. Anonymous functions defined within another function are a different > matter but outside the scope of this question. Yeah, I ran my own tests and it seems so. One might think that this would be some sort of localization mechanism, but it seems not to be the case. Ok, thanks Kurtis, I'll not try any such thing. It seems very strange that it's even legal.