X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE3DA3858402
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=FMjee8ks c=1 sm=1 tr=0 ts=60f840f4
 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
 a=d3QPZhtEGeb8MY5b:21 a=IkcTkHD0fZMA:10 a=94nOnFI1EgyDtX4ev68A:9
 a=QEXdDO2ut3YA:10 a=5vjKX8mcQTjAvxuLlGCK:22
To: cygwin@cygwin.com
References: <CAK5_-8oS-CNCFqL6bqn3YgdnDF4ALq6tn3Z5_AzBEH-P3ai1yQ@mail.gmail.com>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Organization: Systematic Software
Subject: Re: Incorrect expansion of a program argument that is a special
 character?
Message-ID: <45070587-e176-3692-2f4d-cfc6275c05a7@SystematicSw.ab.ca>
Date: Wed, 21 Jul 2021 09:44:51 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.12.0
MIME-Version: 1.0
In-Reply-To: <CAK5_-8oS-CNCFqL6bqn3YgdnDF4ALq6tn3Z5_AzBEH-P3ai1yQ@mail.gmail.com>
Content-Language: en-CA
X-CMAE-Envelope: MS4xfDGoKKeptHrJe1Kjwa/ldbGDolCqgsFbN9wNKKf16YDmNcNLHC3ad10689dwWY2DV1r/cslZP+zALjaV/JWd9Up1prixygZ6YPI7MtlN/ORt3WZXyZfg
 FfD7kDxJgpV/WM+931HxH6XK0RbX7RtxcxQ3RyoDjerAuW3UlZ6FiGQLRc/T5sMIVvGwzy2DmRgiCP76+34LreJXnb7qn02pglXHLS5o5/bYwQhjjhq5zfi7
X-Spam-Status: No, score=-1161.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
 RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
 TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: cygwin@cygwin.com
Cc: Ev Drikos <drikosev@gmail.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On 2021-07-21 05:42, Ev Drikos via Cygwin wrote:
> When I run the program below from my home directory in a PowerShell
> Console (Windows 8-1) I've to use an extra backslash character as
> shown below or the star is expanded. Which happens only when the
> program has been compiled in Cygwin.
> 
> Is this a bug or a known feature?

It's a feature which emulates the argument expansions normally performed 
by shells under Unix like systems.
If a Cygwin program is not run from a Cygwin shell, then the Cygwin 
program startup argument parsing obeys the quoting rules and performs 
the argument expansions which running from a Cygwin shell would normally 
perform, so the program sees the same arguments as running from a Cygwin 
shell would generate.

Run "info bash 'pattern matching'" then press u (Up) and repeat to see 
other argument expansions and processing performed; tab and press Enter 
to view Topics; press q to Quit.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
