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

Token printig fix and a bug



bolyai ~ % zsh -f
bolyai% echo *bar
zsh: no matches found: bar

As you can see the * is missing from the error message.  The fix for that is
below.

The other bug:

bolyai ~ % zsh -f
bolyai% echo foo > /dev/null 2>&1 2>&1
bolyai% echo foo >&2
bolyai% 

Note that the second echo did not print foo.

I admit you rarely do this but there is a more common idiom which produces
this bug:

bolyai ~ % zsh -f
bolyai% echo foo >& /dev/null >& /dev/null
bolyai% echo foo >&2 
bolyai% 

Here foo disappears again. 

Note that this redirection bug only happens with builtins (obviously since
otherwise redirection is done after forking).
Cheers,

Zoltan

*** Src/utils.c	1995/12/22 16:50:13	1.9
--- Src/utils.c	1996/01/03 23:02:33	1.10
***************
*** 157,164 ****
      char *s = buf;
      c &= 0xff;
      if (itok(c)) {
! 	if(c >= Pound && c <= Comma)
! 	    c = ztokens[c - Pound];
  	else 
  	    c = 0;
  	goto done;
--- 157,164 ----
      char *s = buf;
      c &= 0xff;
      if (itok(c)) {
! 	if(c >= STOUC(Pound) && c <= STOUC(Comma))
! 	    c = ztokens[c - STOUC(Pound)];
  	else 
  	    c = 0;
  	goto done;



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