From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11582 invoked from network); 6 Mar 2004 17:59:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Mar 2004 17:59:37 -0000 Received: (qmail 19502 invoked by alias); 6 Mar 2004 17:59:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19546 Received: (qmail 19452 invoked from network); 6 Mar 2004 17:59:23 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Mar 2004 17:59:23 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.11.9.147] by sunsite.dk (MessageWall 1.0.8) with SMTP; 6 Mar 2004 17:59:22 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i26HxLZ06152 for zsh-workers@sunsite.dk; Sat, 6 Mar 2004 09:59:21 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040306175920.ZM6151@candle.brasslantern.com> Date: Sat, 6 Mar 2004 17:59:20 +0000 In-Reply-To: <1040306173839.ZM5329@candle.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Bug#236350: zsh: _prefix completer broken?" (Mar 6, 5:38pm) References: <20040306013513.GA25297@scowler.net> <20040306160540.GW19320@pimlott.net> <1040306173839.ZM5329@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Bug#236350: zsh: _prefix completer broken? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 6, 5:38pm, Bart Schaefer wrote: } Subject: Re: Bug#236350: zsh: _prefix completer broken? } } schaefer<504> egrefoo } No matches for `external command', `builtin command', `shell function', } `alias', `suffix alias', `reserved word', `job', `parameter', `local } directory', `directory in cdpath', or `corrections' } } : _main_complete:159:for for elif-then; ret=0 } : _main_complete:160:for for elif-then; break 2 <-- doesn't happen in 4.0.7 } : _main_complete:169; curcontext=::: } : _main_complete:170; nm=0 This looks like it could be a serious problem. The code in question is this: if [[ -n "$call" ]]; then if "${(@)argv[3,-1]}"; then ret=0 break 2 fi elif "$tmp"; then ret=0 break 2 fi _approximate is being called as "$tmp" here. It returns 1, but the test succeeds and breaks out of the loop, because _approximate uses "trap 'unfunction compadd' EXIT INT" and the return code of the trap is being propagated rather than the return code of _approximate.