From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14450 invoked from network); 26 Jun 2001 13:52:05 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jun 2001 13:52:05 -0000 Received: (qmail 21349 invoked by alias); 26 Jun 2001 13:51:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3955 Received: (qmail 21334 invoked from network); 26 Jun 2001 13:51:07 -0000 From: Sven Wischnowsky Date: Tue, 26 Jun 2001 15:49:55 +0200 (MET DST) Message-Id: <200106261349.PAA24169@beta.informatik.hu-berlin.de> To: zsh-users@sunsite.dk Subject: Re: [zsh 4.0.1 bug] filename completion In-Reply-To: <20010626153704.C20366@greux.loria.fr> Vincent Lefevre wrote: > On Tue, Jun 26, 2001 at 15:29:30 +0200, Sven Wischnowsky wrote: > > In terms of sh/ksh/bash-compatibility, yes. But for zsh it will give > > you the same unless you have shwordsplit set. > > It is currently unset, but I don't want to break my current functions > if I change my mind in the future... > > I've just tried your solution and it doesn't work. > > greux:~> which c. <15:32:45 > c. () { > setopt localoptions nocdablevars > local CDPATH > cd "$@" > } > > and I have > > compdef c.=cd > zstyle ':completion:*:*:c.:*' tag-order local-directories > > at the end of my .zshrc, but when I type "c. soft" and try to complete, > nothing happens. Ouch, right. I hadn't realised that it tries to complete parameters even if only local-directories are selected. As a quick fix, you can add a small completion function for `c.', like this: c. () { setopt localoptions nocdablevars local CDPATH cd "$@" } _c.() { setopt localoptions nocdablevars local CDPATH _cd "$@" } compdef _c. c. zstyle ':completion:*:*:c.:*' tag-order local-directories Note that the compdef line changed. Whoever wrote that code in _cd should probably start re-thinking it (and I don't think it was me this time). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de