This is the mail archive of the
mailing list for the Cygwin project.
Re: ls and wildcards
Karl M <karlm30 <at> hotmail.com> writes:
> I just noticed while looking around after updating dash that "ls /bin/*sh"
does not find bash and dash, but
> it does on my Fedora core 6 machine at work. I see the issue in both 1.5 and
1.7, attached is an example in
> cygwin 1.7.
The issue is not ls, but glob() and fnmatch(), which do not have the same .exe
magic as other functions. In short, fnmatch is merely comparing the pattern
against the values returned by readdir(). Either we could teach readdir() to
omit .exe (similar to how open() and stat() recognize 'ash' as a synonym
for 'ash.exe'), or teach the pattern matchers to to ignore the .exe returned by
readdir() (but still allow searches like *.exe to work). I'm sure that
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple