Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Token printig fix and a bug
- X-seq: zsh-workers 705
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- Subject: Token printig fix and a bug
- Date: Thu, 4 Jan 1996 17:16:30 +0100 (MET)
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
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