delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/15/20:01:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <005a01c244b8$093a1d70$1b0a0a0a@phoenix>
From: "Geoffrey Scheller" <scheller AT entermail DOT net>
To: <cygwin AT cygwin DOT com>
Subject: Re: Why does ls command sometimes case sensitively misbehave?
Date: Thu, 15 Aug 2002 20:01:13 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

>On Thu, 15 Aug 2002, Geoffrey Scheller wrote:
>
>> Why is ls doing this?  Other commands, like vi, also show
>> this behavior:
>>
>>     $ touch foo
>>
>>     $ ls
>>     foo
>>
>>     $ ls foo
>>     foo
>>
>>     $ ls FoO
>>     FoO
>>
>>     $ ls fo*
>>     foo
>>
>>     $ ls Fo*
>>     ls: Fo*: No such file or directory
>>
>> $ bash --version
>> GNU bash, version 2.05b.0(2)-release (i686-pc-cygwin)
>> Copyright (C) 2002 Free Software Foundation, Inc.
>>
>> Cygwin DLL version 1.3.12-2
>>
>> I run Cygwin on Windows XP Professional.
>>
>> Thanks,
>> Geoffrey
>
>What you're seeing is the behavior of the shell's filename globbing, not
>of ls or vi.  What is the value of your CYGWIN environment variable?  Does
>it contain "check_case:<smth>"?  Does it contain "glob" or "noglob"
>(although that, IIRC, is only for command shell windows)?  What are the
>options of bash itself (`set | grep SHELLOPTS`)?
 >    Igor

$ shopt nocaseglob
nocaseglob      off

At first that is what I thought, but

    $ ls
    foo

    $ ls 'Foo'
    Foo

I think shell globbing is OK.

    $ echo 'FoO' fo* FoO*
    FoO foo FoO*

Problem still there whether or not I have turned on case sensitive globbing.
    $ shopt -s nocaseglob

    $ echo 'FoO' fo* FoO*
    FoO foo foo

    $ ls FoO
    FoO

I think it is a little bit subtler.

Geoffrey



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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