This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Case-insensitive globbing (was RE: Cygnus question)


> There are no facilities in cygwin for case insensitive 
> globbing currently
> and I have no plans or desires to add this.  If someone is interested
> (hah) in providing a patch, I'll gladly consider it.
> 
> cgf

"Hah", you say?  That's like a triple-dog dare!

Attached is a patch to glob.c to allow case-insensitive globbing when a
program is run from a Windows shell.  It's nothing special -- one extra
#include and a couple tolowers.

I didn't change the set matching so you would still have a little control
over things:

-----------------------------------------
[C:\]ls a*
arcldr.exe    arcsetup.exe

[C:\]ls A*
arcldr.exe    arcsetup.exe

[C:\]ls [a]*
arcldr.exe    arcsetup.exe

[C:\]ls [A]*
ls: [A]*: No such file or directory

[C:\]bash
bash-2.04$ ls a*
arcldr.exe    arcsetup.exe
bash-2.04$ ls A*
ls: A*: No such file or directory
-----------------------------------------

How do I feel about this patch?  Well, I won't be heartbroken if it's
ignored.

Brad Town  :)

glob.c.patch

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]