From jon.turney@dronecode.org.uk Wed Sep 2 19:55:33 2026 From: jon.turney@dronecode.org.uk (Jon Turney) Date: Wed, 2 Sep 2026 20:55:33 +0100 Subject: [RFC] Preserve native Windows quoting with CYGWIN=noglob In-Reply-To: References: Message-ID: On 25/08/2026 19:26, Erik Demaine wrote: > Dear Cygwin developers, > > I am a long-time Cygwin user (30 years or so), but am new to its > development side, so let me know if I'm missing any protocol or best > practices. No, this is fine. Sorry about the delay in replying! > Cygwin's command-line argument processing when called from a non-Cygwin > process is a complex subject with lots of history (see below for > links).? I'd like to propose (and happy to implement) a relatively small > change: > > PROPOSAL: CYGWIN=noglob mode handles quotes the same as CYGWIN=glob mode Thanks very much for this detailed and thoughtful review of the state of this thorny problem. [...] > > My proposal is to narrow the scope from the 2021 rewrite: > > 1. Decode a native Windows command line using the same quote/backslash > ?? rules regardless of CYGWIN=[no]glob. > 2. Let allow_glob control only wildcard, bracket, brace, and tilde > ?? expansion. > 3. Preserve the existing glob-enabled and Cygwin-parent behavior. > > If full backward compatibility is a requirement, then we could add > another flag parallel to [no]glob, something like [no]quote.? I haven't > thought about the best design for this, given that the current > implementation conflates the two issues, but I imagine we could fogure > it out through discussion. Hmm... I think the question is "is the existing handling of quotes so broken than nobody can be relying on it"? In which case, we can safely classify it as a bug and just fix it. It seems that way to me, but this isn't a feature I actually have an experience using. > Would a focused patch along these lines be welcome? Very much so! It would probably help people reason about the behavioural change this implies, if there was a small test plan, or even an automated test.