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

Ignoreeof warning message regression

This is an old regression, which apparently occurred between release 5.3.1
and 5.4 of zsh.

If you have the ignoreeof option set, and type a CTL-D to the shell, you
are supposed to get a warning message:

zsh: use 'exit' to exit.

Instead, a blank line is emitted. This was introduced by
commit 34656ec2f00d6669cef56afdbffdd90639d7b465, specifically the change to

The problem occurs both on Ubuntu 18.04.1 running zsh 5.4.2 and macOS
10.12.6 running 5.4 forwards to 5.7.1. Stock macOS 10.12.6 contains zsh 5.2
and does not manifest the bug.

The problem disappears when the change to Src/Zle/zle_main.c is backed out.

index 3487b5d9f..71930f76b 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1256,7 +1256,6 @@ zleread(char **lp, char **rp, int flags, int context,
char *init, char *finish)
     resetneeded = 0;
     fetchttyinfo = 0;
     trashedzle = 0;
-    clearflag = 0;
     raw_lp = lp;
     lpromptbuf = promptexpand(lp ? *lp : NULL, 1, NULL, NULL, &pmpt_attr);
     raw_rp = rp;

I am aware that backing this out may break other things, but perhaps it
might give a hint to someone who is familiar with this area of the code.


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