From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29261 invoked from network); 12 Oct 2008 07:11:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL autolearn=unavailable version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Oct 2008 07:11:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 38081 invoked from network); 12 Oct 2008 07:11:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Oct 2008 07:11:22 -0000 Received: (qmail 9833 invoked by alias); 12 Oct 2008 07:11:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25853 Received: (qmail 9800 invoked from network); 12 Oct 2008 07:11:02 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 Oct 2008 07:11:02 -0000 Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4BCD680524C0 for ; Sun, 12 Oct 2008 09:10:59 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.215]) by vms173005.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K8M00BRR6M5TMB5@vms173005.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 12 Oct 2008 02:10:54 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m9C7AqJn030708 for ; Sun, 12 Oct 2008 00:10:52 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m9C7ApCW030707 for zsh-workers@sunsite.dk; Sun, 12 Oct 2008 00:10:51 -0700 Date: Sun, 12 Oct 2008 00:10:51 -0700 From: Bart Schaefer Subject: Re: Regression in braces completion In-reply-to: <081011213249.ZM29979@torch.brasslantern.com> To: "Zsh Hackers' List" Message-id: <081012001051.ZM30706@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20a807210810111932r1b32b746l3cca788a383e84ed@mail.gmail.com> <081011213249.ZM29979@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Regression in braces completion" (Oct 11, 9:32pm) X-Virus-Scanned: ClamAV 0.92.1/8414/Sun Oct 12 05:30:50 2008 on bifrost X-Virus-Status: Clean On Oct 11, 9:32pm, Bart Schaefer wrote: } } On Oct 11, 10:32pm, Vin Shelton wrote: } } } } $ ls abc{d ==> } } $ ls abcdef{ } } } } which is not correct. } } : _main_complete:62:then elif; [[ abcdef != */* && a == \~ ]] } } That's $PREFIX on line 62 and the curly brace is already missing. Turns out that's a red herring, it was that way in the older version as well. As nearly as I can track it down, the problem is with: * 25130 slightly tweaked for typos: Completion/Unix/Type/_path_files: changes to use -U flag to compadd so that spelling corrections in non-final path segments are accepted. If I remove the -U option from all the calls to compadd in _path_files, the old behavior is restored. (That took *way* longer to track down than it should have, because I didn't realize just how *many* calls to "compadd -U" there are, and I missed the crucial one the first time and ended up chasing a different red herring for an hour. Oy.) Removing the -U *only* from the compadd on line 634 of _path_files is sufficient to fix this particular example, but I wonder if it should be removed from all three of the compadd calls in the "we are listing, or something" branch (see comment line 605), or if it needs to be omitted based on some other condition ... or if we need to know when spelling correction has been done so we can only add -U when we have to, or some even more complicated set of conditions.