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

Re: PATCH: Re: Implementation of simple newuser module (how to start?)



Bart Schaefer wrote:
> } +autoload -U zsh-install-newuser
> } +zsh-install-newuser
> 
> I suggest that instead this be:
> 
>  autoload -U +X zsh-install-newuser && zsh-install-newuser
> 
> That is, don't execute the function if it can't be autoloaded, and don't
> redefine it if it is already defined.

But autoload +X returns false if the function was already defined, so it
wouldn't execute the function in that case.

I have belatedly realised that zsh-newuser-install would probably be a
better name, since if the function gets split up into smaller functions
it gives a namespace.

-- 
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