zsh-workers
 help / color / mirror / code / Atom feed
From: David Bohman <debohman@gmail.com>
To: zsh-workers@zsh.org
Subject: Ignoreeof warning message regression
Date: Tue, 12 Feb 2019 09:47:03 -0800	[thread overview]
Message-ID: <CAB9xhmNUw05v5cvkzBvWj+JSCnksEe_jRApdwgHB296TnYgugA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

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
Src/Zle/zle_main.c.

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.

Thanks.

             reply	other threads:[~2019-02-12 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190212174900epcas1p2f71b5f3bafef8ad73a95c1cdb1bf5f8c@epcas1p2.samsung.com>
2019-02-12 17:47 ` David Bohman [this message]
2019-02-12 18:34   ` Peter Stephenson
2019-02-13 23:50 David Bohman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB9xhmNUw05v5cvkzBvWj+JSCnksEe_jRApdwgHB296TnYgugA@mail.gmail.com \
    --to=debohman@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).