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

Re: PATCH: hierarchical module names

zefram@xxxxxxxx wrote:
> Each existing module `foo' is renamed to `zsh/foo', except that the `zsh'
> module is renamed to `zsh/main'.  We should decide at this point whether
> all the modules distributed with zsh will always go into the `zsh/'
> namespace, or whether we can also bundle modules in other namespaces
> (should `zsh/zprof' be `sven/zprof', for example).

I don't like this bit.  It means zmodload behaves differently from the way
it's done for several years now.  I don't see why the main modules
shouldn't keep their old names.  Indeed, if you can arrange (and I don't
see why you can't, given the suffix on the module itself) that both
`modname' and `modname/mymod' can exist as modules (i.e. you can have
modname.so and modname/mymod.so), there's no reason why we shouldn't just
tell people supplying modules separately to use an arbitrary prefix and
keep bundled ones (even new bundled ones) without.  I don't see this part
of the change being very popular otherwise.

Or, if you prefer, you can make a name without a slash equivalent to the
same with zsh/ stuck in front.  That might be the simplest.

> * There is no way to load a module from a specified filename.  There
>   should probably be a distinct option for this, if the capability is
>   to exist at all.

I don't think this is a worry; you can write a function with some $fpath
trickery if you're desparate.

Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>

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