From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1064 invoked from network); 21 Jun 2001 10:50:58 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 2001 10:50:58 -0000 Received: (qmail 16408 invoked by alias); 21 Jun 2001 10:50:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15028 Received: (qmail 16395 invoked from network); 21 Jun 2001 10:50:17 -0000 From: "Bart Schaefer" Message-Id: <1010621105003.ZM9901@candle.brasslantern.com> Date: Thu, 21 Jun 2001 10:50:03 +0000 In-Reply-To: <3B31CAE9.CBBE1E30@u.genie.co.uk> Comments: In reply to Oliver Kiddle "Re: PATCH: Completion for AUTO_CD" (Jun 21, 11:22am) References: <1010621091740.ZM1701@candle.brasslantern.com> <3B31CAE9.CBBE1E30@u.genie.co.uk> <200106211030.MAA03537@beta.informatik.hu-berlin.de> In-Reply-To: <200106211030.MAA03537@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: Completion for AUTO_CD" (Jun 21, 12:30pm) X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: Completion for AUTO_CD MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 21, 11:22am, Oliver Kiddle wrote: } Subject: Re: PATCH: Completion for AUTO_CD } } > named _autocd because _command is pre-empted for the `command' builtin. } } I'm not too keen on the name. I'd suggest using _command and renaming } the existing _command, perhaps to _command_builtin (we have an } _jobs_builtin). I briefly considered that, but then we also ought to rename _vared to _vared_builtin and rename _in_vared to _vared and so on and so forth, and I just didn't want to deal with it. As a lesser consideration, if it's named `_autocd' it's more obvious that people who don't use autocd could replace it with something else. } My initial thought on seeing your patch was that completion for autocd } already works. This is because of the line in _command_names which adds } executable files and directories. Unfortunately that doesn't cover cdpath, and cdpath is the main reason I have autocd set in the first place. } This is there for completing commands by specifying the full path to } them. Yes, that's why I asked why _command doesn't call it. } _cd should also possibly be adding usernames and parameters for the } cdablevars option. Hm. On Jun 21, 12:30pm, Sven Wischnowsky wrote: } Subject: Re: PATCH: Completion for AUTO_CD } } Oliver Kiddle wrote: } } > It is unfortunate that we now get } > the directories twice but I can't think of a simple fix. } } I was about to mention the same when this mail came. The only thing I } can think of is to make _command_names use only -g, not -/ (it will } revert to directory completion if there is no executable anyway). Or } maybe do that only if autocd is set and _command_names is called from } _autocd. Or something. _autocd could pass an argument to _command_names, along the lines of -e. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net