From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18219 invoked from network); 5 Jul 2005 14:25:44 -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 14:25:44 -0000 Received: (qmail 88848 invoked from network); 5 Jul 2005 14:25:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 14:25:38 -0000 Received: (qmail 8131 invoked by alias); 5 Jul 2005 14:25:29 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9032 Received: (qmail 8121 invoked from network); 5 Jul 2005 14:25:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jul 2005 14:25:29 -0000 Received: (qmail 87767 invoked from network); 5 Jul 2005 14:25:28 -0000 Received: from vanunu.ucsc.edu (128.114.141.22) by a.mx.sunsite.dk with SMTP; 5 Jul 2005 14:25:22 -0000 Received: from localhost (localhost [127.0.0.1]) by vanunu.ucsc.edu (Postfix) with ESMTP id 80F59615097; Tue, 5 Jul 2005 07:25:39 -0700 (PDT) Date: Tue, 5 Jul 2005 07:25:39 -0700 (PDT) From: William Scott X-X-Sender: wgscott@vanunu.ucsc.edu To: Nikolai Weibull Cc: zsh-users Subject: Re: Adding a prefix to certain filename completions In-Reply-To: <20050705080946.GC5333@puritan.pnetwork> Message-ID: References: <20050704193711.GF6330@puritan.pnetwork> <20050705042324.GA21301@picard.franken.de> <20050705080946.GC5333@puritan.pnetwork> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE 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 Hi Nikolai: I don't think this is a completion issue. In any case, this works: function vim { command vim ./"$@" } but you will want to put some lines in there to test whether the file is in $PWD, and if it is, do the above, otherwise, behave normally. HTH, Bill On Tue, 5 Jul 2005, Nikolai Weibull wrote: > Thomas K=F6hler wrote: > > > Nikolai Weibull wrote: > > > > 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. I thought I knew how to do this, but alas I do not. > > > Anyone that does? > > > Not knowing the zsh answer, I would add a "--" once before the > > "strange" file name: > > vim -- +myfile > > Again, the ./ prefix also works. However, I would like for this to be > handled automatically, kind of like spaces being escaped when completing > a path containing them. Thanks for responding, > nikolai > > -- > Nikolai Weibull: now available free of charge at http://bitwi.se/! > Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. > main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} >