From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13308 invoked from network); 8 May 2008 14:59:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 May 2008 14:59:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 56904 invoked from network); 8 May 2008 14:59:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 May 2008 14:59:44 -0000 Received: (qmail 10614 invoked by alias); 8 May 2008 14:59:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24981 Received: (qmail 10600 invoked from network); 8 May 2008 14:59:39 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 8 May 2008 14:59:39 -0000 Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by bifrost.dotsrc.org (Postfix) with ESMTP id A258680ED172 for ; Thu, 8 May 2008 16:59:33 +0200 (CEST) Received: from torch.brasslantern.com ([71.116.113.54]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K0K00BJM1N4GI40@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Thu, 08 May 2008 09:59:29 -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 m48ExREu004100 for ; Thu, 08 May 2008 07:59:27 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m48ExRIG004099 for zsh-workers@sunsite.dk; Thu, 08 May 2008 07:59:27 -0700 Date: Thu, 08 May 2008 07:59:27 -0700 From: Bart Schaefer Subject: Re: Bug in spell correction of directories for cd In-reply-to: <20080508095307.5dd54625@news01> To: zsh-workers@sunsite.dk Message-id: <080508075927.ZM4098@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20080507233234.GQ13554@prunille.vinc17.org> <20080508095307.5dd54625@news01> Comments: In reply to Peter Stephenson "Re: Bug in spell correction of directories for cd" (May 8, 9:53am) X-Virus-Scanned: ClamAV 0.91.2/7064/Thu May 8 14:36:43 2008 on bifrost X-Virus-Status: Clean On May 8, 9:53am, Peter Stephenson wrote: } } Hmm... I wonder if there's scope for an even-more-magic-space command } that sees if a shell argument has just been completed and if it } should spell check it? The trouble with that is that completion usually adds the trailing space, so when would one ever type the space that invokes even-more-magic-space? } You'd need a long list either of exceptions or inclusions, which might } have to be narrowed down by argument position. Here's a nutty idea. In the same way that highlighting regions are maintained for the buffer, maintain a list of regions that label how that particular part of the buffer was filled: by ordinary self-insert, by completion, by yanking from the kill ring, etc. Then when global correction makes its pass over the words, it could use those region labels for context. Of course one reason this is nutty is because of the ability for user- defined widgets to manipulate BUFFER and friends directly. The other is that correction is in the main shell and doesn't necessarily have anything to do with ZLE.