From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@zsh.org
Subject: Re: Tab completion error after upgrade
Date: Sat, 27 Jun 2015 17:43:41 +0100 [thread overview]
Message-ID: <20150627174341.6cbc20de@ntlworld.com> (raw)
In-Reply-To: <mmlsv3$2am$2@ger.gmane.org>
On Sat, 27 Jun 2015 12:12:49 +0200
Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> * Thorsten Kampe (Sat, 27 Jun 2015 12:09:11 +0200)
>
> > The error comes from "setopt no_multifuncdef" in my .zshrc.
Ah. This isn't Cygwin-specific at all.
MULTIFUNCDEF is turned on for completion, but that happens within
_main_complete itself, and the error is during parsing, not execution,
and functions are parsed to the end before executing.
So the simplest thing to do is just split the definitions. I believe
these deliberately don't use the trap builtin.
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index c023268..9c4cfac 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -141,11 +141,16 @@ _completer_num=1
# We assume localtraps to be in effect here ...
integer SECONDS=0
-TRAPINT TRAPQUIT() {
+TRAPINT() {
zle -M "Killed by signal in ${funcstack[2]} after ${SECONDS}s";
zle -R
return 130
}
+TRAPQUIT() {
+ zle -M "Killed by signal in ${funcstack[2]} after ${SECONDS}s";
+ zle -R
+ return 131
+}
# Call the pre-functions.
next prev parent reply other threads:[~2015-06-27 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 18:25 Thorsten Kampe
2015-06-26 19:06 ` Peter A. Castro
2015-06-26 20:35 ` Thorsten Kampe
2015-06-26 20:42 ` Peter A. Castro
2015-06-26 20:50 ` Thorsten Kampe
2015-06-26 21:52 ` Bart Schaefer
2015-06-27 10:09 ` Thorsten Kampe
2015-06-27 10:12 ` Thorsten Kampe
2015-06-27 16:43 ` Peter Stephenson [this message]
2015-06-27 18:35 ` Bart Schaefer
2015-06-27 19:34 ` Assorted TRAPxxx / trap xxx observations Bart Schaefer
2015-06-26 19:45 ` Tab completion error after upgrade Frank Terbeck
2015-06-27 12:51 ` zzapper
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=20150627174341.6cbc20de@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-users@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).