Additional odd behavior after my upgrade to the latest CYGWIN64 version

Michael Goldshteyn mgold10000@gmail.com
Sat Mar 16 21:49:45 GMT 2024


Cygwin handles (filename) case insensitivity in a very weird way at the
Windows command prompt:
------------------------------
c:\Users\Michael>set CYGWIN=

c:\Users\Michael>printf "%q " 'a' 'A' "a" "A" a A
a A a A a A

REM OK, so far so good, but, now:
c:\Users\Michael>set CYGWIN=glob:ignorecase

C:\Users\Michael>printf "%q " 'a' 'A' "a" "A" a A
a a a a a A

REM So, if I don't put a command line arg into any sort of quotes, it gets
lower-cased for cygwin apps (from the Windows command line).
REM I should also add that there is no file named 'a' or 'A' in the current
working directory.

REM This behavior, of course, doesn't happen in Cygwin bash:
------------------------------
C:\Users\Michael>bash
Michael@lambda /cygdrive/c/Users/Michael
$ echo "$CYGWIN"
glob:ignorecase
Michael@lambda /cygdrive/c/Users/Michael
$ printf "%q " 'a' 'A' "a" "A" a A
a A a A a A
$ # Output looks correct, quoted or not
------------------------------
The unsolicited conversion of case for quoted string is very odd, to say
the least. If you remove the glob:ignorecase from the CYGWIN env var
definition, use of filenames on Windows with Cygwin tools becomes
completely case sensitive, which is very undesirable when compared to the
fact that other Windows tools do not care about file case (i.e., case
insensitive, but preserving, as MS puts it).


More information about the Cygwin mailing list