From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13331 invoked from network); 26 Jun 2001 11:21:07 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jun 2001 11:21:07 -0000 Received: (qmail 1596 invoked by alias); 26 Jun 2001 11:20:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3951 Received: (qmail 1575 invoked from network); 26 Jun 2001 11:20:09 -0000 From: Sven Wischnowsky Date: Tue, 26 Jun 2001 13:18:59 +0200 (MET DST) Message-Id: <200106261118.NAA23966@beta.informatik.hu-berlin.de> To: zsh-users@sunsite.dk Subject: Re: [zsh 4.0.1 bug] filename completion In-Reply-To: <4a90a3eafbvincent@vinc17.org> Vincent Lefevre wrote: > On 26 Jun, Andrej Borsenkow wrote: > > It is. It makes no difference if one is named directory and other a file as > > long as 'cd soft' works. And 'soft' *is* exact match for 'soft'. > > OK, you're right. But then, "cd so" should complete to "cd soft" (and > not "cd software"), then give the choice between "soft" (because it > is a named directory) and "software" (directory in the cwd). [...] That's what my patch does. > BTW, can I define an alias "c." in such a way that it behaves as if > cdpath were (.), or as "cd ./"? Something like this: c.() { setopt localoptions nocdablevars # if you want that... local CDPATH cd $* } (Or just use a function that sticks a `./' or `$PWD/' in front of the first argument and then calls cd if that's enough for you.) Completion for that: compdef c.=cd This says that arguments for `c.' are to be completed as for `cd'. zstyle ':completion:*:*:c.:*' tag-order local-directories And this says that you want only local directories (those in `.') to be completed for `c.'. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de