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

Re: Good, easy to use, upstream defaults for zsh (i.e. improving usability)



Bart Schaefer wrote:
> Here's something that occurred to me:
> 
> During startup, if none of the ${ZDOTDIR:-$HOME}/.z* files are found,
> zsh looks for (but does not complain if it does not find) a "new user"
> module, e.g. zsh/newuser, and loads it.
> 
> (Or the module could be loaded unconditionally, and the test for whether
> the .z* files exist could be part of the module bootup.)

The second alternative is more natural from the point of view of
modularity, although a little less efficient.  Presumably we could
safely attempt to unload the module immediately.

> We could provide a default implementation of zsh/newuser that looks
> for files in /usr/share/zsh/$VERSION (or the equivalent configure-
> time path) and either simply reads them, or copies them to the .z*
> locations.  Admins who don't want this could choose not to install
> the module, or could provide their own rewrite.

This is a neat idea.

One thing that occurs to me is that we need to make it easy for admins
to override the defaults.  Hence I think it should look in, say,
<install-path>/newuser/ and <install-path>/$VERSION/newuser/, probably
in that order since the latter will be installed by default, for
whatever files seem appropriate, where <install-path> is /usr/share/zsh
or whatever.  It's possible that version specific code might be
necessary, but the same problem turns up with all initialisation files,
so I don't think that need stop us allowing a global override.  (This
could then decide to look for version specific code, of course.)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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