X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 14 Jul 2009 17:36:43 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ls and wildcards
Message-ID: <20090714153643.GL27613@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <COL102-W1198ECFD60B8E49747914B5230@phx.gbl> <loom.20090714T152354-292@post.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <loom.20090714T152354-292@post.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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.


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

