From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: PATCH: Builtin exit from inside ZLE widget
Date: Thu, 10 Sep 2015 08:09:48 -0700 [thread overview]
Message-ID: <150910080948.ZM22372@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3S7seXp=0Nqiu0f35XAv+n7ketL8mTcA4xm0tTPVFOQPA@mail.gmail.com>
On Sep 3, 5:00am, Mikael Magnusson wrote:
}
} % bindkey 0 e
} % e() exit
} % zle -N e
} % '
} quote> 0
}
} this prints the PS2 prompt indefinitely, ctrl-c is ignored and so is a
} normal kill, I have to kill -9 from another shell to stop it.
This seems to be it:
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e610ae1..ec3d2c3 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1276,7 +1276,7 @@ zleread(char **lp, char **rp, int flags, int context, char *init, char *finish)
alarm(0);
freeundo();
- if (eofsent || errflag) {
+ if (eofsent || errflag || exit_pending) {
s = NULL;
} else {
zleline[zlell++] = ZWC('\n');
There will be a final "unmatched '" reported in Mikael's specific example,
but quashing that is an exercise that can wait.
next prev parent reply other threads:[~2015-09-10 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 14:10 Ctrl-c not working during correction with 5.1 Markus Trippelsdorf
2015-09-01 18:15 ` Bart Schaefer
2015-09-02 13:10 ` Christian Neukirchen
2015-09-02 14:09 ` Bart Schaefer
2015-09-03 2:32 ` Bart Schaefer
2015-09-03 3:00 ` Mikael Magnusson
2015-09-10 15:09 ` Bart Schaefer [this message]
2015-09-03 3:17 ` Bart Schaefer
2015-09-03 13:21 ` Christian Neukirchen
2015-09-03 16:39 ` Peter Stephenson
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=150910080948.ZM22372@torch.brasslantern.com \
--to=schaefer@brasslantern.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).