bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12566: ls case-insensitivie


From: Bob Proulx
Subject: bug#12566: ls case-insensitivie
Date: Wed, 3 Oct 2012 02:19:41 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Michael Talbot-Wilson wrote:
> $ ls -lFGgd [G-G]*
> drwxr-xr-x 4 4096 Apr  8 13:13 GC/
> $ ls -lFGgd [F-G]*
> drwxr-xr-x  4 4096 Apr  8 13:13 GC/
> drwxr-xr-x 16 4096 Jun 11 15:43 gtk+-2.24.4/

Thanks for the report.  But you are misunderstanding that it is it is
shell that is expanding the file glob.  The ls command has nothing to
do with that part of things.  You can verify this by using the echo
command to echo the line.

  $ echo ls -lFGgd [G-G]*
  GC

  $ echo ls -lFGgd [F-G]*
  GC gtk+-2.24.4

Since the shell is expanding the file glob and handing the result to
ls the ls command isn't responsible.

However what you are seeing is not a bug in the shell either.  This
behavior changed when en_US and other natural language locales were
introduced with "dictionary" collating sequences.  In those case is
folded and punctuation is ignored.  See this reference:

  http://www.faqs.org/docs/bashman/bashref_35.html

Many of us who do not like this set the following to use a C collating
sequence.  For me:

  export LANG=en_US.UTF-8
  export LC_COLLATE=C

The shell will need to be restarted with those variables in force.

Bob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]