www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Eric Blake <ebb9 AT byu DOT net> |
Subject: | Re: ls and wildcards |
Date: | Tue, 14 Jul 2009 15:30:41 +0000 (UTC) |
Lines: | 22 |
Message-ID: | <loom.20090714T152354-292@post.gmane.org> |
References: | <COL102-W1198ECFD60B8E49747914B5230 AT phx DOT gbl> |
Mime-Version: | 1.0 |
User-Agent: | Loom/3.14 (http://gmane.org/) |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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. [http://cygwin.com/acronyms/#PCYMTWLL] 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 http://cygwin.com/acronyms/#PTC -- Eric Blake -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |