From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20948 invoked by alias); 23 Mar 2011 23:32:05 -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: 15883 Received: (qmail 19919 invoked from network); 23 Mar 2011 23:32:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at necoro.eu does not designate permitted sender hosts) Message-ID: <4D8A810A.3050300@necoro.eu> Date: Thu, 24 Mar 2011 00:23:54 +0100 From: =?UTF-8?B?UmVuw6kgJ05lY29ybycgTmV1bWFubg==?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110317 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: Zsh Users Subject: Local inner functions X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig07E906187ECDC9A9D6BA8346" --------------enig07E906187ECDC9A9D6BA8346 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, I often use the construct of defining a function inside another function. Now I discovered, that these pour into the environment, i.e. if I have foo () { bar () { } } and I execute "foo", "bar" is now visible in my environment. Is there some way of making 'bar' to be local to 'foo'? Using the 'local' keyword does not work :). I know, that in principle it is possible to explicitly 'unfunction' functions, but this is not a usable way sometimes. Thanks for your help, Ren=C3=A9 --------------enig07E906187ECDC9A9D6BA8346 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2KgQ4ACgkQ4UOg/zhYFuDaNACfU68dFKjyxP/UaIv9tnow2zyd WiYAoIITSpWClMHG4OHeJsGASL0/rhSY =gjK8 -----END PGP SIGNATURE----- --------------enig07E906187ECDC9A9D6BA8346--