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

bug: EOF at a continuation prompt



% (
subsh> ^D
zsh: parse error near `\n'
> 

That bare ">" prompt shouldn't appear.  We should go back to the ZLE
prompt.  The culprit seems to be in input.c:

	/*
	 * Otherwise, see if we have reached the end of input
	 * (due to an error, or to reading from a single string).
	 */
	if (strin || errflag) {
	    lexstop = 1;
	    return lastc = ' ';
	}
	/* As a last resort, get some more input */
	if (inputline())
	    return lastc = ' ';

It looks like the first if() here should be used, but errflag is zero.
Consequently inputline() gets called.

And look what happens if you type at that extra prompt:

> ls
zsh: command not found: s

Huh?

-zefram



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