From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28891 invoked from network); 5 Jul 2005 16:56:34 -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 16:56:34 -0000 Received: (qmail 6347 invoked from network); 5 Jul 2005 16:56:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 16:56:27 -0000 Received: (qmail 6302 invoked by alias); 5 Jul 2005 16:56:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9036 Received: (qmail 6290 invoked from network); 5 Jul 2005 16:56:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jul 2005 16:56:19 -0000 Received: (qmail 5250 invoked from network); 5 Jul 2005 16:56:19 -0000 Received: from wproxy.gmail.com (64.233.184.196) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 16:56:14 -0000 Received: by wproxy.gmail.com with SMTP id i31so908064wra for ; Tue, 05 Jul 2005 09:56:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=h8ddoh/FJdaYXkLapHFb+bSmTEEoA2IkAhrfsvzvlJ88OxuxKnvlKqPyO/ExfK0kM+0/LboE8UNMA4KYdUBnYOpbZoQ7lK2WhogoKk/7KkkC0pm4zqrY6QD43EZ8bg7fnJJYwQYgjwgzYDVKJDwrYIML5gjkz6ZbiwvT3U8A0A0= Received: by 10.54.16.30 with SMTP id 30mr4765444wrp; Tue, 05 Jul 2005 09:56:12 -0700 (PDT) Received: by 10.54.68.9 with HTTP; Tue, 5 Jul 2005 09:56:12 -0700 (PDT) Message-ID: <488030720507050956650e316d@mail.gmail.com> Date: Tue, 5 Jul 2005 09:56:12 -0700 From: John Reese Reply-To: John Reese To: zsh-users Subject: Re: Adding a prefix to certain filename completions In-Reply-To: <20050705172846.GB5362@puritan.pnetwork> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050704193711.GF6330@puritan.pnetwork> <20050705042324.GA21301@picard.franken.de> <20050705080946.GC5333@puritan.pnetwork> <20050705172846.GB5362@puritan.pnetwork> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 2005/7/5, Nikolai Weibull : ... > I know that the completion system can be made to suit this need. > Filenames beginning with a =3D are escaped properly with the right > settings. >=20 Unfortunately, I'm behind the times, but the following works with the old completion system. I'm sure something along the same lines can done with zstyle and compadd and all that other wackiness. compctl -f -x 'S[+]' -f -P './' -- vim That's: for vim, complete filenames, except for arguments starting with +, for which insert "./" at the beginning and then complete filenames. Note that the + already has to be on the command-line; if you have menu completion on and you type "vim ", filenames starting with + won't match the above rule and they won't get the ./ prepended. But "vim +" does the right thing.