From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5532 invoked from network); 26 Jan 2001 14:32:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jan 2001 14:32:59 -0000 Received: (qmail 7836 invoked by alias); 26 Jan 2001 14:32:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13392 Received: (qmail 7825 invoked from network); 26 Jan 2001 14:32:51 -0000 Message-ID: To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: PATCH: avoid hashing command names twice on Cygwin In-Reply-To: Your message of "Fri, 26 Jan 2001 16:36:53 +0300." <000301c0879d$0b59bea0$21c9ca95@mow.siemens.ru> Date: Fri, 26 Jan 2001 14:32:24 +0000 From: Peter Stephenson > We could be more intellegent and test if stat(foo) != stat(foo.exe) to decide > if we should add both. Is it worth troubles? > > OTOH it is just command table; for all purposes hashing foo is the same as > hashing foo.exe except very rare cases when both exist. It will be confusing if completion doesn't recognise foo.exe as an executable under its full name. Hashing both may not be necessary, but it should preferably be stored and retrieved in such way that both are used whenever an executable is being searched for. A natural extension for DOS- and Windows-like environments which could even be an option on other systems (you wouldn't want it turned on by default) would be to do what 4DOS used to and take a list of executable suffixes and interpreters, which could be taken from an array (ordinary so as to specify precedence), e.g. zexecsufixes=(com: exe: pl:'/c/Programe Files/perl/perl.exe' zsh:zsh sh:bash) where an empty string specifies that the file is already in an executable format. That suggests that the programme would be stored under it's full name, or at least with a suitable flag, but returned for completion both as that and the basename. But that's a lot of work. (You could extend it to shell functions, builtins etc., but that would probably just be asking for confusion.) -- Peter Stephenson Software Engineer Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070