From: Adam Dinwoodie <adam@dinwoodie.org>
To: cygwin@cygwin.com
Subject: Re: wildcards don't work in directory with files with odd characters
Date: Mon, 18 May 2020 19:03:00 +0100 [thread overview]
Message-ID: <CA+kUOakpSETMesmnnnazr+50r37tCJ0Ua=+LOXsEdtaEC0=cTQ@mail.gmail.com> (raw)
In-Reply-To: <c8346953-4241-e51d-6b3d-a5ce64a66e0e@jeffunit.com>
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.
HTH
Adam
next prev parent reply other threads:[~2020-05-18 18:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 12:40 jeff
2020-05-18 15:55 ` Andrey Repin
2020-05-18 16:21 ` jeff
2020-05-18 18:03 ` Adam Dinwoodie [this message]
2020-05-18 18:10 ` jeff
2020-05-18 20:01 ` David Macek
2020-05-18 20:12 ` jeff
2020-05-19 10:49 ` Andrey Repin
2020-05-19 19:08 ` Chris Wagner
2020-05-19 2:04 ` Chris Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+kUOakpSETMesmnnnazr+50r37tCJ0Ua=+LOXsEdtaEC0=cTQ@mail.gmail.com' \
--to=adam@dinwoodie.org \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).