Subject: RE: Cygnus question
From: Scott Carter <[email-masked]>
To: [email-masked]
Cc: Ken Arromdee <[email-masked]>, "'David Starks-Browning'" <[email-masked]>
Date: Thu, 2 Nov 2000 16:50:02 -0700

I'm not a unix expert, nor a Windows expert, but I don't think David's
statements are all  correct. In unix, as I understand it (and as David
stated), it is the shell (bash, csh, ksh, ...) that does the filename
expansion on the b* argument in 
ls b*
The shell passes that expansion to ls on the command line (unless the
expansion is empty, in which case the shell just passes the b*).

If you have cygwin installed on a WinNT machine (with the cygwin bin
directory in the PATH), you can run the cygwin ls command from the WinNT
command prompt, and it works, the same as it does from a cygwin bash prompt.
But I'm pretty sure that the WinNT shell (cmd.exe) does NOT expand b*.  If
that is true, ls must read the b* from the command line and (likely) pass it
to a function which does the expansion. And I suspect that the function is
located in the cygwin1.dll, and that it, in turn, calls a windows function,
which is case insensitive. If that is true, the cygwin function would have
to do extra work to force case sensitivity. [semi-educated speculation]

So it seems to me that it would be possible to make ls case insensitive in
cygwin. 

Whether or not it's a good idea, and how easily it could be done, is a
different issue.

For my 2 cents worth, I've been working with cygwin on a WinNT machine for
about 6 months (after developing on unix machines for 6 years). I often find
that a certain task is more easily/conveniently accomplished using cygwin
utilities (ls, find, grep, ...) than with WinNT utilities. But because the
WinNT file system is case insensitive, some tasks would be even easier to
accomplish if (some of) the cygwin utilities could be operated in a
filename-case-insensitive mode.

Scott Carter

-----Original Message-----
From: David Starks-Browning [mailto:[email-masked]]
Sent: Thursday, November 02, 2000 09:44 AM
To: Ken Arromdee
Cc: [email-masked]
Subject: Re: Cygnus question

On Wednesday 1 Nov 00, Ken Arromdee writes:
> On Wed, 1 Nov 2000, David Starks-Browning wrote:
> > > >How do I set up Cygnus so as to smash case?  I want to be able to do
"ls b*"
> > > >or "grep foo b*" and not have to do it twice for b* and B*...
> > > 
> > > See bash documentation.
> > Or the FAQ:
> > 	"How can I get bash filename completion to be case insensitive?"
> 
> I seem to not have phrased my question properly.
> 
> I'm not using bash.  I'm using the Cygnus tools only, typing in the
commands
> from a Windows command prompt.
> 
> And I'm aware I can use an expression such as [bB*], but my question is
how
> to set things up so I don't need it.

I don't know that you can.  In UNIX, it *is* bash (or csh or ...) that
expands an expression like 'ls b*' to 'ls' plus a list of files that
matches your expression.  It's called "globbing".  (Don't ask me
why...)

Since the original UNIX commands ls, grep, ... have no builtin support
for filename globbing (since they expect the shell to do it), you
won't find it in Cygwin ports of these commands.

So you have to find a way to get cmd.exe or command.com to do this for
you.  I don't think Cygwin can help you with that problem.

Hope this helps.

Regards,
David

--
Want to unsubscribe from this list?
Send a message to [email-masked]