This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does ls command sometimes case sensitively misbehave?


On Thu, 15 Aug 2002, Geoffrey Scheller wrote:

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

Did you try it under other shells (sh, ksh, tcsh)?  Did you try it under
the command prompt?  And what is the value of your CYGWIN environment
variable?  I think you might have a "check_case:adjust" in there...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]