zsh-workers
 help / color / mirror / code / Atom feed
* [Bug] make, zsh and functions
@ 2008-03-06 12:51 Adrien Pierard
  2008-03-06 13:03 ` Peter Stephenson
  2008-03-06 13:09 ` Adrien Pierard
  0 siblings, 2 replies; 3+ messages in thread
From: Adrien Pierard @ 2008-03-06 12:51 UTC (permalink / raw)
  To: zsh-workers

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
% make all
make:.:4: not enough arguments

------------snip---------
That's it. Now, make is screwed.
This behaviour doesn't show in bash or sh.


Cheers,

Adrien.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug] make, zsh and functions
  2008-03-06 12:51 [Bug] make, zsh and functions Adrien Pierard
@ 2008-03-06 13:03 ` Peter Stephenson
  2008-03-06 13:09 ` Adrien Pierard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2008-03-06 13:03 UTC (permalink / raw)
  To: zsh-workers

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@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug] make, zsh and functions
  2008-03-06 12:51 [Bug] make, zsh and functions Adrien Pierard
  2008-03-06 13:03 ` Peter Stephenson
@ 2008-03-06 13:09 ` Adrien Pierard
  1 sibling, 0 replies; 3+ messages in thread
From: Adrien Pierard @ 2008-03-06 13:09 UTC (permalink / raw)
  To: zsh-workers

Adrien Pierard wrote:
> This is a bug that is easy to reproduce:

Ha, I've just been told that it isn't a bug, rather a feature, and that
it declared *two* functions, make and foo.

I personally think that this is a *very* bad design choice, but anyway,
I could revert it easily with "unfunction make", as ft told me on IRC.

Cheers,

Adrien.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-06 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 12:51 [Bug] make, zsh and functions Adrien Pierard
2008-03-06 13:03 ` Peter Stephenson
2008-03-06 13:09 ` Adrien Pierard

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).