From: "René 'Necoro' Neumann" <lists@necoro.eu>
To: Zsh Users <zsh-users@zsh.org>
Subject: Local inner functions
Date: Thu, 24 Mar 2011 00:23:54 +0100 [thread overview]
Message-ID: <4D8A810A.3050300@necoro.eu> (raw)
[-- 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 --]
next reply other threads:[~2011-03-23 23:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 23:23 René 'Necoro' Neumann [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D8A810A.3050300@necoro.eu \
--to=lists@necoro.eu \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).