From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9273 invoked from network); 8 Mar 2004 16:36:54 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Mar 2004 16:36:54 -0000 Received: (qmail 21034 invoked by alias); 8 Mar 2004 16:36:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19564 Received: (qmail 21020 invoked from network); 8 Mar 2004 16:36:39 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Mar 2004 16:36:39 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Mar 2004 16:36:38 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i28Gacv21396 for ; Mon, 8 Mar 2004 16:36:38 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id ; Mon, 8 Mar 2004 16:36:18 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 8 Mar 2004 16:38:29 +0000 To: James Devenish , zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: case-insensitive globbing In-reply-to: "James Devenish"'s message of "Mon, 08 Mar 2004 21:49:55 +0800." <20040308134955.GA16797@mail.guild.uwa.edu.au> Date: Mon, 08 Mar 2004 16:36:37 +0000 Message-ID: <12049.1078763797@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 08 Mar 2004 16:38:29.0718 (UTC) FILETIME=[C998BF60:01C4052B] James Devenish wrote: > In message <20040308124027.GA15505@mail.guild.uwa.edu.au> > on Mon, Mar 08, 2004 at 08:40:27PM +0800, James Devenish wrote: > > In message <5792.1078749261@csr.com> > > on Mon, Mar 08, 2004 at 12:34:21PM +0000, Peter Stephenson wrote: > > > > % ls /tmp/blah > > > > DATE > > > > % rehash > > > > % where date > > > > /tmp/blah/date > > > > /bin/date > > But, now I note: > > % where DATE > /tmp/blah/DATE > /bin/DATE > > So...fair enough. An odd experience, but does make sense. For all I > know, this might even be an Apply kludge to make ported POSIX software > work in a case-insensitive environment (I haven't looked at how zsh > queries the OS for these files). [BTW: I received your reply after I > had already written this e-mail.] On a related note: > > % ls -l =date > -r-xr-xr-x 1 root wheel 19276 24 Sep 14:51 /bin/date* > % ls -l =DATE > -r-xr-xr-x 1 admin wheel 19276 24 Sep 14:51 /tmp/blah/DATE* > > Not complaining about this -- just pointing it out so that everyone's > aware of it. I don't know how this and other such letter-case issues are > handled in Cygwin. Perhaps there could be a footnote to the caseglob The difference is that `where' is looking for all occurrence, so is explicitly searching for either /path/to/date or /path/to/DATE. If that matches, it will not try to normalise the name. This is the only arguable bug; I know you're not arguing it is a bug, but it's the only candidate for any change that I can see. However, it requires special knowledge about the filing system. On the other hand, `=' is just looking at the hash table for where either date or DATE lives. This gets created once and for all the first time it searches the directory or when you do `rehash'. In this case it browses the directory, so gets the canonical name. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************