zsh-users
 help / color / mirror / code / Atom feed
* Local inner functions
@ 2011-03-23 23:23 René 'Necoro' Neumann
  2011-03-24  1:16 ` nix
  2011-03-24  1:41 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: René 'Necoro' Neumann @ 2011-03-23 23:23 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

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é


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-24 11:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23 23:23 Local inner functions René 'Necoro' Neumann
2011-03-24  1:16 ` nix
2011-03-24  8:50   ` René 'Necoro' Neumann
2011-03-24  1:41 ` Bart Schaefer
2011-03-24  9:38   ` René 'Necoro' Neumann
2011-03-24 11:51     ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).