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

Re: PATCH: wrapper functions in modules



I wrote:

> ... [patch for adding wrapper functions in modules]

I forgot to mention it: If a module installs such wrapper functions
and there was a function called which caused the `before'-function to
be executed and the module also has a `after'-function which needs to
be called if the `before'-function was called we might have problems,
since the shell function may unload the module so that the `after'
function will not be called.
So the question is: should we add a convention that the module can
export a function that will be called when trying to unload a module
and which says if the module can currently be unloaded?
Alternatively I could change the code so that a module cannot be
unloaded if it has defined `after'-functions and there are currently
shell functions being executed.
I think we could even change the code so that unloading a module
automatically removes builtins, conditions, and wrapper functions
defined by it...

And another question: why is the variable containing the paths to
module-directories named `module_path'? Comparing this with `fpath' I
would have expected `mpath' (and `MPATH') or something like that.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author