From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 135 invoked from network); 2 May 2009 14:55:33 -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=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham 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; 2 May 2009 14:55:33 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 22273 invoked from network); 2 May 2009 14:55:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 May 2009 14:55:26 -0000 Received: (qmail 7620 invoked by alias); 2 May 2009 14:55:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26918 Received: (qmail 7606 invoked from network); 2 May 2009 14:55:20 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 2 May 2009 14:55:20 -0000 Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by bifrost.dotsrc.org (Postfix) with ESMTP id 8005380EA0C0 for ; Sat, 2 May 2009 16:52:33 +0200 (CEST) Received: from torch.brasslantern.com ([96.249.201.13]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KJ0003B7URKY6FM@vms173005.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 02 May 2009 09:54:57 -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 n42Esthl029261 for ; Sat, 02 May 2009 07:54:56 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n42EstEN029260 for zsh-workers@sunsite.dk; Sat, 02 May 2009 07:54:55 -0700 From: Bart Schaefer Message-id: <090502075455.ZM29259@torch.brasslantern.com> Date: Sat, 02 May 2009 07:54:55 -0700 In-reply-to: <18939.51080.161444.80368@gargle.gargle.HOWL> Comments: In reply to Greg Klanderman "another file completion problem in 4.3.9-dev-2" (May 2, 12:09am) References: <18939.51080.161444.80368@gargle.gargle.HOWL> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh list Subject: Re: another file completion problem in 4.3.9-dev-2 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.92.1/9316/Sat May 2 15:41:58 2009 on bifrost X-Virus-Status: Clean On May 2, 12:09am, Greg Klanderman wrote: } } Here's another file completion problem in 4.3.9-dev-2: } } | [~] greg@lwm| zsh -f } | lwm% echo $ZSH_VERSION } | 4.3.9-dev-2 } | lwm% echo $ZSH_PATCHLEVEL } | 1.4662 } | lwm% rm .zcompdump } | lwm% autoload -U compinit } | lwm% compinit -u } | lwm% zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' '+ l:|=* r:|=*' } | lwm% mkdir temp } | lwm% cd temp } | lwm% touch BarBaz } } Now if I try to complete "ls baz", I get nothing. } } But if I complete "ls az", it does correctly complete to "ls BarBaz". Hmm. The default completers only include _complete and _ignored. In order to get the behavior you want, I also have to allow corrections: zstyle ':completion:*' completer _complete _ignored _approximate "baz" is a mismatch in at least two dimensions, both position in the word (not a prefix) and case. I suspect the matcher list can adjust for only one dimension at a time. On the other hand, the following DOES seem to be a bug, so maybe it is related somehow: torch% autoload -U compinit torch% compinit -D -u torch% setopt no_case_glob torch% ls -la total 88 drwx------ 2 schaefer schaefer 4096 May 2 06:47 . drwxrwxrwt 27 root root 69632 May 2 07:15 .. -rw-rw-r-- 1 schaefer schaefer 0 May 2 06:47 BarBaz torch% ls ba (no result). Setting no_case_glob is supposed to cause file completion to be applied case-insensitively even if there is no matcher-list, but compfiles -p tmp1 accex '' ' m:{a-zA-Z}={A-Za-z}' '' fake '*' (line 409 in _path_files) doesn't return any matches in tmp1. Sigh. Some documentation (at least in comments) for the functions in computils.c would really have been helpful.