Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Creating A Clean Environment For Autoloaded Functions
- X-seq: zsh-users 17507
- From: Russell Harmon <eatnumber1@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Creating A Clean Environment For Autoloaded Functions
- Date: Sun, 30 Dec 2012 04:44:01 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; bh=8lXzng1y98J5KAh6qC544tlpckGSv7a8lQ5XGRNvs1I=; b=Q3jYj2IBlKxnb6ZZUdYgrwCgRyB73LMCWfConSksuVbU2Zz85D6kN0N+OLq7iSAzYL iXej86NFe/lF92J3Z8XIJz/rh2zhxDc9UGbXuJhBkjoP46SaAALQKTFGCAmST6O984Yk SD/p9ItaK/YwsGYn+q6Tw4SAvrZcRRV2aHSfZKjgx6WNlMm/2kFTv/Eu3GdWjDC2TzlG mP8LT08drw16a/NhHOMmebec2xWFn9s6T2J8eZ64qUeOkAu1seySTwrIuBAwJVJwGQes lwWJirOeudd2YSNYLP+AdpnMbZi5wNHuOFWeGW2f0hyaiEFeAmiowkAmoQsrqUo4kpGr 3XPw==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: russ@xxxxxxxxxxxxxx
If I want to write a function which can be autoloaded, how can I
prevent functions defined outside of my function from being accessible
from within my function? For example, I have a function ls { gls "$@"
}, and I know of no way to prevent that function from leaking into the
definition of all the functions I've autoloaded which use ls.
Additionally, is it possible to zmodload a module which is
automatically unloaded from the environment after my function
completes _only if_ that module was not already loaded?
--
Russell Harmon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author