From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 896 invoked by alias); 27 Jun 2015 16:43:50 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20281 Received: (qmail 24867 invoked from network); 27 Jun 2015 16:43:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=dtgmcAU4 c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=3PUyuqeIMa-5DwARLQgA:9 a=CjuIK1q_8ugA:10 Date: Sat, 27 Jun 2015 17:43:41 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Tab completion error after upgrade Message-ID: <20150627174341.6cbc20de@ntlworld.com> In-Reply-To: References: <150626145238.ZM21872@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 27 Jun 2015 12:12:49 +0200 Thorsten Kampe 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.