From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16819 invoked from network); 5 Jul 2005 17:02:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jul 2005 17:02:26 -0000 Received: (qmail 12941 invoked from network); 5 Jul 2005 17:02:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 17:02:19 -0000 Received: (qmail 7568 invoked by alias); 5 Jul 2005 17:02:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9037 Received: (qmail 7556 invoked from network); 5 Jul 2005 17:02:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jul 2005 17:02:10 -0000 Received: (qmail 11964 invoked from network); 5 Jul 2005 17:02:10 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 17:02:03 -0000 Received: from candle.brasslantern.com ([71.116.88.149]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IJ500IM3ZBC33I0@vms048.mailsrvcs.net> for zsh-users@sunsite.dk; Tue, 05 Jul 2005 12:02:01 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j65H1wf6013398 for ; Tue, 05 Jul 2005 10:01:59 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j65H1wjZ013397 for zsh-users@sunsite.dk; Tue, 05 Jul 2005 10:01:58 -0700 Date: Tue, 05 Jul 2005 17:01:57 +0000 From: Bart Schaefer Subject: Re: Adding a prefix to certain filename completions In-reply-to: <20050704193711.GF6330@puritan.pnetwork> To: zsh-users Message-id: <1050705170157.ZM13396@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050704193711.GF6330@puritan.pnetwork> Comments: In reply to Nikolai Weibull "Adding a prefix to certain filename completions" (Jul 4, 9:37pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Jul 4, 9:37pm, Nikolai Weibull wrote: } Subject: Adding a prefix to certain filename completions } } Vim has issues with files that begin with a + (or two +s for that } matter), so I'd like to add a ./ prefix to such files when completing. YOu can get most of the way there with this: zstyle -e ':completion:*:vim:*' fake-files 'reply=("$PWD:$(print ./+*)")' zstyle ':completion:*:vim:*' matcher 'b:+=./+' However, all that does is offer the ./+* as alternatives, it doesn't remove the originals. The trouble is that file completion is sensitive to directory separators, so as soon as you introduce the slash, the rules begin to apply to the stuff on the right of the slash rather than to the entire string. You'd be better off if there were some other way to protect the + from interpretation by vim. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net