From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14385 invoked from network); 6 Mar 2004 23:32:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Mar 2004 23:32:58 -0000 Received: (qmail 22917 invoked by alias); 6 Mar 2004 23:32:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19548 Received: (qmail 22858 invoked from network); 6 Mar 2004 23:32:48 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Mar 2004 23:32:48 -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 23:32:47 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i26NWk806322 for zsh-workers@sunsite.dk; Sat, 6 Mar 2004 15:32:46 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040306233246.ZM6321@candle.brasslantern.com> Date: Sat, 6 Mar 2004 23:32:46 +0000 In-Reply-To: <4419.1078596182@trentino.logica.co.uk> Comments: In reply to Oliver Kiddle "Re: Bug#236350: zsh: _prefix completer broken?" (Mar 6, 7:03pm) References: <20040306013513.GA25297@scowler.net> <20040306160540.GW19320@pimlott.net> <1040306173839.ZM5329@candle.brasslantern.com> <4419.1078596182@trentino.logica.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh workers Subject: Re: Bug#236350: zsh: _prefix completer broken? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 6, 7:03pm, Oliver Kiddle wrote: } Subject: Re: Bug#236350: zsh: _prefix completer broken? } } > zstyle ':completion:*' completer \ } > _oldlist _expand _complete _match _ignored _approximate _prefix } > } > However, 4.2.0-pre-3 never gets beyond trying _approximate. } } This is the bug I reported in 17846. Aha. } For now, I moved _prefix before _approximate. I still think the trap behavior is wrong, but as a stopgap we can do this: Index: Completion/Base/Completer/_approximate =================================================================== --- _approximate 7 Jan 2002 15:18:19 -0000 1.5 +++ _approximate 6 Mar 2004 23:26:05 -0000 @@ -65,7 +65,7 @@ builtin compadd "$_correct_expl[@]" "$@" } - trap 'unfunction compadd' EXIT INT + trap 'local _x=$?; unfunction compadd; ((! $_x))' EXIT INT fi _comp_correct=1 This won't work in general because (( )) can only return 1 or 0, not some arbitrary exit code, but it's fine for _approximate.