From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13606 invoked from network); 19 May 2000 15:28:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 May 2000 15:28:22 -0000 Received: (qmail 24649 invoked by alias); 19 May 2000 15:28:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11469 Received: (qmail 24641 invoked from network); 19 May 2000 15:28:11 -0000 From: "Bart Schaefer" Message-Id: <1000519152805.ZM4279@candle.brasslantern.com> Date: Fri, 19 May 2000 15:28:05 +0000 In-Reply-To: <200005191324.PAA08160@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Why does ^X? behave differently than TAB?" (May 19, 3:24pm) References: <200005191324.PAA08160@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: PATCH: Re: Why does ^X? behave differently than TAB? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 19, 3:24pm, Sven Wischnowsky wrote: } Subject: Re: Why does ^X? behave differently than TAB? } } You wrote: } } > Here's the actual script. Run it as an autoloaded function. At the } > "ftpupdate command: " prompt, type ^X? twice. } > } > ... } > } > trap "$r ; trap - 0 2 3 15 ZERR ; return 1" 0 2 3 15 ZERR } } The `compadd -x' in _message returns non-zero and makes this trap be } called. And of course, the next time round, there is no `compctl -T' } anymore. } } Hm. I don't want to change the return value of compadd and it wouldn't } solve the problem anyway. Do we have to temporarily unset/default all } traps in completion? Urgh. Not all traps, just ZERR. We should handle the errexit option, too. Index: Completion/Commands/_complete_debug =================================================================== @@ -3,6 +3,8 @@ setopt localoptions nullglob rcexpandparam extendedglob unsetopt markdirs globsubst shwordsplit nounset ksharrays +setopt localtraps noerrexit ; trap - ZERR + (( $+_debug_count )) || integer -g _debug_count local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count] local w="${(qq)words}" Index: Completion/Core/_main_complete =================================================================== @@ -20,6 +20,9 @@ unsetopt markdirs globsubst shwordsplit nounset ksharrays exec