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

Re: [Bug] make, zsh and functions



Adrien Pierard wrote:
> Hi.
> 
> This is a bug that is easy to reproduce:
> ------------snip---------
> % cat > Makefile
> all:
> 	@echo hello
> ^D
> % make
> hello
> % make foo().
> % make
> make:.:3: not enough arguments

This isn't a bug; see the syntax for function definitions in the zshmisc
manual.  "make foo()." defines two functions called make and foo with the
body ".".  This feature isn't often used; it seems to be there to make
it easy to define identical trap functions.

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



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