zsh-workers
 help / color / mirror / code / Atom feed
* Token printig fix and a bug
@ 1996-01-04 16:16 Zoltan Hidvegi
  0 siblings, 0 replies; only message in thread
From: Zoltan Hidvegi @ 1996-01-04 16:16 UTC (permalink / raw)
  To: zsh-workers

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-01-04 16:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-01-04 16:16 Token printig fix and a bug Zoltan Hidvegi

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