Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Creating A Clean Environment For Autoloaded Functions



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