www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/14/12:13:20

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 14 Jul 2009 18:12:57 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ls and wildcards
Message-ID: <20090714161257.GM27613@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <COL102-W1198ECFD60B8E49747914B5230 AT phx DOT gbl> <loom DOT 20090714T152354-292 AT post DOT gmane DOT org> <20090714153643 DOT GL27613 AT calimero DOT vinschen DOT de> <20090714154751 DOT GF6942 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20090714154751.GF6942@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Jul 14 11:47, Christopher Faylor wrote:
> On Tue, Jul 14, 2009 at 05:36:43PM +0200, Corinna Vinschen wrote:
> >On Jul 14 15:30, Eric Blake wrote:
> >> 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
> >
> >Hmm, both ideas sound nice.  Probably not for Cygwin 1.7.1, but it's
> >something we could explore in a later release.  Both together might be
> >especially helpful.
> 
> I don't like the idea of having readdir lie about what's actually in the
> directory that sounds like it will complicate things.
> 
> Having Cygwin's glob function assume that ".exe" matches EOL seems like
> it makes more sense.  I realize that will mean modifying similar functions
> in bash and elsewhere.
> 
> Btw, some versions of cmd.exe don't work well with executables which lack
> extensions.  I just ran into this problem recently.  I don't remember
> exactly where, probably it was with NT 4.

cmd.exe never works well with executables lacking the suffix.  It's
not only on NT4.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019