From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2537 invoked from network); 27 Sep 2004 15:14:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Sep 2004 15:14:45 -0000 Received: (qmail 49317 invoked from network); 27 Sep 2004 15:14:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Sep 2004 15:14:39 -0000 Received: (qmail 4052 invoked by alias); 27 Sep 2004 15:13:53 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8029 Received: (qmail 4028 invoked from network); 27 Sep 2004 15:13:52 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Sep 2004 15:13:52 -0000 Received: (qmail 47808 invoked from network); 27 Sep 2004 15:12:53 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 27 Sep 2004 15:12:46 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-19.tower-36.messagelabs.com!1096297965!9607177 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 5089 invoked from network); 27 Sep 2004 15:12:45 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-19.tower-36.messagelabs.com with SMTP; 27 Sep 2004 15:12:45 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i8RFCiAI020848 for ; Mon, 27 Sep 2004 16:12:45 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id BDD1679891B8 for ; Mon, 27 Sep 2004 17:12:24 +0200 (CEST) Cc: zsh-users@sunsite.dk X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <20040927164336.557f6485@buddha.localdomain.de> From: Oliver Kiddle References: <20040921175108.5a5f7697@buddha.localdomain.de> <20040922045511.GA22277@picard.franken.de> <20040925003747.241f4a2d@buddha.localdomain.de> <17298.1096276791@trentino.logica.co.uk> <20040927160024.5a664979@buddha.localdomain.de> <200409271418.i8REIoZf009904@news01.csr.com> <20040927164336.557f6485@buddha.localdomain.de> Subject: Re: completion within word Date: Mon, 27 Sep 2004 17:12:24 +0200 Message-ID: <19431.1096297944@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 "Matthias B." wrote: > On Mon, 27 Sep 2004 15:18:49 +0100 Peter Stephenson wrote: > > > "Matthias B." wrote: > > > Pathname completion should *always* work *unconditionally* and > > > everything else should be offered in addition to it, if the completion > > > code believes it makes sense in the appropriate position. Use _files as a completer. If you use a wrapper around _files, you can make it return 1 causing later completers to get a go after it: _files_first() { _files "$@" return 1 } zstyle ':completion:*::::' completer _files_first _complete _ignored It'll now always give you file completion. To solve the PATH colons problems, add the compset commands in my later example. > > You can bind a key that just does filename > > Oliver may know some gotchas I'm missing. Only that I'd use ':completion:complete-filename::::' as the context. Also note that you can simply use: bindkey '\ef' _bash_complete-word > I can tell you. It doesn't solve my original problem, which is that > > BLA=/usr:/us You can create a wrapper around _files to handle the colons: _my_files() { compset -P '*:' compset -S ':*' _files "$@" } Oliver