Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Proof of concept: "static" parameter scope
- X-seq: zsh-workers 36788
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: Proof of concept: "static" parameter scope
- Date: Mon, 5 Oct 2015 21:55:14 +0000
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=6xQNDRLNXowzCnWWf+1EORA614s=; b=ZN7f9D yIUXfkxuD54inMyqeuq4baBnajS8ChUpe/nn5h7cUHCcjZKsEuLQniDxVEnPEjYb l3kgnPqXJU5jScx2Jn1NMitvpHuiAxWm0ZEch6GmDmuiT4fO5gsWWFCjwq4n3x7S hLKUYrNJWneeUlK9MJw86dfLs32cl9+wMW36s=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=6xQNDRLNXowzCnWWf+1EORA614s=; b=ijWwx svR5v7Vst5AteScVWnV9LWSGIyxjcfzYym4c7gLj+nEU/LaAI1bl/jkkVlsQybRm sLtX2sUYjDojdWnIM3Jw9X2QfrCajV6JD4nr5rXgXhtSNVvebH0VdXto1i+g253q YkbzMlQGoKxOxbO0ZW04lPq6i2qnoIlLnmacdo=
- In-reply-to: <20151003201936.29b52aa4@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <150924192305.ZM2680@torch.brasslantern.com> <20150925101540.5d2ded9c@pwslap01u.europe.root.pri> <20150930203825.307d3f8f@ntlworld.com> <150930172748.ZM3986@torch.brasslantern.com> <20151003201936.29b52aa4@ntlworld.com>
Peter Stephenson wrote on Sat, Oct 03, 2015 at 20:19:36 +0100:
> On Wed, 30 Sep 2015 17:27:48 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > Enabling the builtin again does not fix this:
> >
> > torch% enable -r local
> > torch% zxxx
> > zxxx: number expected
>
> Obviously, since it parsed the function zxxx when local wasn't a
> reserved word and you've done nothing to reparse it. You need to parse
> it again.
>
> % enable -r local
> % zxxx() { local x=(a b c); print $x }
> % zxxx
> a b c
Related issue:
% disable -r local
% zxxx() { local x=(a b c); print $x }
% enable -r local
% which zxxx
zxxx () {
local x=(a b c)
print $x
}
Should it output 'builtin local x=(a b c)'?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author