From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id DE3DA3858402 for ; Wed, 21 Jul 2021 15:44:52 +0000 (GMT) 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 Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id 6EDMmO1udFRDp6EOymSYPN; Wed, 21 Jul 2021 15:44:52 +0000 Received: from [192.168.1.104] ([68.147.0.90]) by cmsmtp with ESMTP id 6EOxmHAtO3DJA6EOxmKR0v; Wed, 21 Jul 2021 15:44:52 +0000 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 Reply-To: cygwin@cygwin.com To: cygwin@cygwin.com References: Cc: Ev Drikos From: Brian Inglis 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 8bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 15:44:55 -0000 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.]