X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CFF20384B0C0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=jeffunit.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jeff AT jeffunit DOT com X-Sender-Id: dreamhost|x-authsender|jeff AT jeffunit DOT com X-Sender-Id: dreamhost|x-authsender|jeff AT jeffunit DOT com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jeff AT jeffunit DOT com X-MailChannels-Auth-Id: dreamhost X-Abaft-Broad: 4569e5a647fa8906_1589825425668_2877969461 X-MC-Loop-Signature: 1589825425667:2210600495 X-MC-Ingress-Time: 1589825425667 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jeffunit.com; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=jeffunit.com; bh=R6bX KzK/5bTwvLON/xXwjd7Y4qA=; b=stdxjNLGXKu6B5L8TbjHi556uXHTUVnGcYOf YF90vXh6Zxj+zsoq7kkL78dbEPZFEw4HUMcBBSO0wa+WoDwveMVDrmraqbWL3aq+ DihPhVCGiiJl10Z6GG+rBAT4jVGGijMxifYF/UvIg+03BL2Ciu3xQnwLTunYpg0V aiBP1tw= Subject: Re: wildcards don't work in directory with files with odd characters To: "cyg >> The Cygwin Mailing List" References: <4319b2cc-07c0-8739-f87d-2c2cebbecae7 AT jeffunit DOT com> <1975574327 DOT 20200518185545 AT yandex DOT ru> X-DH-BACKEND: pdx1-sub0-mail-a78 From: jeff Message-ID: <231407d0-fd87-01f4-0fd1-6948448950be@jeffunit.com> Date: Mon, 18 May 2020 11:10:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Antivirus: Avast (VPS 200518-0, 05/17/2020), Outbound message X-Antivirus-Status: Clean X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedruddthedguddulecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpehjvghffhcuoehjvghffhesjhgvfhhfuhhnihhtrdgtohhmqeenucggtffrrghtthgvrhhnpeeifeeugedtgeeugeefgeekvdeugfefjeegieeifeejueeltdevudfgfeekveekgfenucfkphepudelkedrjedvrddvtdegrdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplgduledvrdduieekrdegjedruddthegnpdhinhgvthepudelkedrjedvrddvtdegrdejpdhrvghtuhhrnhdqphgrthhhpehjvghffhcuoehjvghffhesjhgvfhhfuhhnihhtrdgtohhmqedpmhgrihhlfhhrohhmpehjvghffhesjhgvfhhfuhhnihhtrdgtohhmpdhnrhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" On 5/18/2020 11:03 AM, Adam Dinwoodie wrote: > On Mon, 18 May 2020 at 17:21, jeff wrote: >> On 5/18/2020 8:55 AM, Andrey Repin wrote: >>> Greetings, jeff! >>> >>>> I have a directory that has some files with odd files. >>>> I can do a 'ls', successfully. However if I do a 'ls *'' I get: >>>> ls: cannot access '*': No such file or directory >>>> Here is ls output: >>>> 'Highlander-S03E21-Final'$'\303\251''_Part_I-22.mkv' >>>> 'Highlander-S03E22-Final'$'\303\251''_Part_II-23.mkv' >>>> I am pretty sure this used to work. >>>> This is not specific to ls. wc has the same behavior for example. >>> Are you trying to run it from Cygwin shell or from some native one, like cmd? >>> >> I am running from windows 'command prompt' aka cmd. When run from bash >> everything seems to work correctly. > In which case this is expected behaviour: Cygwin's `ls` expects the > shell (e.g. Bash) to expand globs like `*`, but Windows' command > prompt expects applications to handle expanding globs (or the Windows > equivalents thereof) themselves. When you call a Cygwin command like > `ls` directly from the Windows command prompt, Windows passes the > arguments as-is to the Cygwin command, and the Cygwin command assumes > that the arguments it received are already appropriately expanded. > > If this was working previously, I can only assume it's because you > were calling Windows' `ls` (which I seem to recall exists and is > essentially an alias for `dir`), which expects Windows semantics and > therefore handles its own expansions. If the directory doesn't contain any files with odd characters in the name, then 'ls *' run from cmd works just fine. Only when there are odd characters in the file name is there an issue. thanks, jeff -- 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