zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: James Devenish <j-devenish@users.sourceforge.net>,
	zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: case-insensitive globbing
Date: Mon, 08 Mar 2004 16:36:37 +0000	[thread overview]
Message-ID: <12049.1078763797@csr.com> (raw)
In-Reply-To: "James Devenish"'s message of "Mon, 08 Mar 2004 21:49:55 +0800." <20040308134955.GA16797@mail.guild.uwa.edu.au>

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 <pws@csr.com>                  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
**********************************************************************


  reply	other threads:[~2004-03-08 16:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040308122200.GA13641@mail.guild.uwa.edu.au>
2004-03-08 12:34 ` Peter Stephenson
2004-03-08 12:40   ` James Devenish
2004-03-08 13:43     ` Peter Stephenson
2004-03-08 13:49     ` James Devenish
2004-03-08 16:36       ` Peter Stephenson [this message]
     [not found] <18393.1078742029@csr.com>
2004-03-08 12:03 ` Peter Stephenson
2004-03-08 13:38   ` Oliver Kiddle
2004-03-08 13:45     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12049.1078763797@csr.com \
    --to=pws@csr.com \
    --cc=j-devenish@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).