From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cheetah.birch.relay.mailchannels.net (cheetah.birch.relay.mailchannels.net [23.83.209.34]) by sourceware.org (Postfix) with ESMTPS id CFF20384B0C0 for ; Mon, 18 May 2020 18:10:27 +0000 (GMT) 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@jeffunit.com X-Sender-Id: dreamhost|x-authsender|jeff@jeffunit.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DC21E640205 for ; Mon, 18 May 2020 18:10:25 +0000 (UTC) Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-96-6-17.trex.outbound.svc.cluster.local [100.96.6.17]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5DE446406A9 for ; Mon, 18 May 2020 18:10:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jeff@jeffunit.com Received: from pdx1-sub0-mail-a78.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.8); Mon, 18 May 2020 18:10:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jeff@jeffunit.com X-MailChannels-Auth-Id: dreamhost X-Abaft-Broad: 4569e5a647fa8906_1589825425668_2877969461 X-MC-Loop-Signature: 1589825425667:2210600495 X-MC-Ingress-Time: 1589825425667 Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id 0D4177F0F1 for ; Mon, 18 May 2020 11:10:25 -0700 (PDT) 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= Received: from [192.168.47.105] (cpe-198-72-204-7.socal.res.rr.com [198.72.204.7]) (Authenticated sender: jeff@jeffunit.com) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPA id AAE227F0F8 for ; Mon, 18 May 2020 11:10:24 -0700 (PDT) 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@jeffunit.com> <1975574327.20200518185545@yandex.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-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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@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: Mon, 18 May 2020 18:10:31 -0000 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