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

Re: Any comments on users/7883 ?



Bart Schaefer wrote:
> It fixes a crash bug, so it should either get committed or someone should 
> deduce the better fix to which I alluded.

Isn't this the correct fix?  The problem with hn being NULL is because
the later code uses is_builtin which assumes it isn't NULL.  So we need
to take account of is_builtin being set (from the previous time through
the loop) at this point, too.

The error message for 'command -v blub' is now `no such builtin: -v'.
Is that correct?  I don't see any documentation for the fact that the -v
argument isn't handled when posixbuiltins is set.

Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.70
diff -u -r1.70 exec.c
--- Src/exec.c	3 Sep 2004 09:47:49 -0000	1.70
+++ Src/exec.c	6 Sep 2004 12:01:24 -0000
@@ -1950,7 +1950,7 @@
 		break;
 	    }
 	    if (!(hn = builtintab->getnode(builtintab, cmdarg))) {
-		if (cflags & BINF_BUILTIN) {
+		if ((cflags & BINF_BUILTIN) || is_builtin) {
 		    zwarn("no such builtin: %s", cmdarg, 0);
 		    lastval = 1;
                     opts[AUTOCONTINUE] = oautocont;

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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