From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10435 invoked from network); 2 May 2006 21:53:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 May 2006 21:53:25 -0000 Received: (qmail 51319 invoked from network); 2 May 2006 21:53:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 May 2006 21:53:19 -0000 Received: (qmail 20652 invoked by alias); 2 May 2006 21:53:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22437 Received: (qmail 20642 invoked from network); 2 May 2006 21:53:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 May 2006 21:53:15 -0000 Received: (qmail 51018 invoked from network); 2 May 2006 21:53:15 -0000 Received: from mta07-winn.ispmail.ntl.com (HELO mtaout01-winn.ispmail.ntl.com) (81.103.221.47) by a.mx.sunsite.dk with SMTP; 2 May 2006 21:53:14 -0000 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20060502215314.GCYA29343.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Tue, 2 May 2006 22:53:14 +0100 Received: from pwslaptop.csr.com ([81.107.42.12]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20060502215314.MDVE24467.aamtaout02-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Tue, 2 May 2006 22:53:14 +0100 Received: from pwslaptop.csr.com (pwslaptop.csr.com [127.0.0.1]) by pwslaptop.csr.com (8.13.6/8.13.4) with ESMTP id k42Lr7XS003301 for ; Tue, 2 May 2006 22:53:08 +0100 Message-Id: <200605022153.k42Lr7XS003301@pwslaptop.csr.com> From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: zsh versus tcsh's "complete=enhance" (for Germans) In-Reply-To: Your message of "Tue, 02 May 2006 10:56:33 BST." Date: Tue, 02 May 2006 22:53:07 +0100 Peter Stephenson wrote: > Andy Spiegl wrote: > > for case-insensitive German I am using this: > > zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}' > > > > Is there a shorter way to write this? > > It looks like equivalence classes (the braces in that pattern) for > completion matchers are fairly simply handled at present. The code for > this part of the matching appears (for once) not to be too tortuous and > it ought to be possible to extend it. Guess what... it's not as easy as all that. [Waits for gasps of amazement to subside.] The current code appears to be broken with multibyte characters, in fact, since it uses a lookup table of 256 characters. The matcher system is fairly heavily embedded into the completion code, so it may well be too much like hard work to rewrite the whole thing using wide characters. However, it ought to be possible (if rather slower) to store only the matcher pattern as wide characters and convert the character for comparison on input, or alternatively simply determine the multibyte character length each time (yuk) and use that to look for substrings. Anybody who feels strongly enough that the whole thing should be written properly and efficiently is encouraged to do so... -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/