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

Re: autoloading modules

> In order to support autoloading of modules that provide multiple builtins,
> it would be helped by an option to zmodload that says "load this module,
> but keep quiet if it's already loaded".  The patch below adds such an
> option, -i (for idempotent).  To make use of it in zmodautoload, change
> "zmodload" to "zmodload -i" above.

Would not -q (quiet) be a better name for this option?  And the same can be
achieved by redirection stderr.

> Zoltan, what is "zmodload -f" for?

Well it is quite useless, it'll probably be removed.  Originally I added
this to test dlopen on Linux.  The manual claims that if the same library
is loaded twice the same handle is returned which is not true (at least
libdl.so.1.8.2 does not behave this way).

I think that modules should be identified by their name with the extension
and pathname stripped and zsh should not allow loading two modules with the
same name (even if they have different path name).

I also like your other patch to compile in modules but this sed hack is
quite unelegant.  There must be a way to avoid that.


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