public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Goldshteyn <mgold10000@gmail.com>
To: cygwin@cygwin.com
Subject: Additional odd behavior after my upgrade to the latest CYGWIN64 version
Date: Sat, 16 Mar 2024 16:49:45 -0500	[thread overview]
Message-ID: <CAEFTnVM7jVQ6_ikUggQQqVq2fwB5bm2EfEdnRB3UT8Gj_xeAOw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

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).

             reply	other threads:[~2024-03-16 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16 21:49 Michael Goldshteyn [this message]
2024-03-18  9:11 ` Andrey Repin
2024-03-18 10:32 ` Corinna Vinschen

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=CAEFTnVM7jVQ6_ikUggQQqVq2fwB5bm2EfEdnRB3UT8Gj_xeAOw@mail.gmail.com \
    --to=mgold10000@gmail.com \
    --cc=cygwin@cygwin.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).