GNU bug report logs - #33123
ls: add case-sensitive --color option

Previous Next

Package: coreutils;

Reported by: Matt Martini <matt.martini <at> imaginarywave.com>

Date: Tue, 23 Oct 2018 03:46:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Mikael Magnusson <mikachu <at> gmail.com>
To: 33123 <at> debbugs.gnu.org
Cc: Eric Blake <eblake <at> redhat.com>
Subject: bug#33123: ls: add case-sensitive --color option
Date: Tue, 10 May 2022 10:45:37 +0200
Hi,

In bug #9086 [1] there was a lot of good discussion about case
insensitive matching for dircolors. This was all then summarily
ignored in [2] which made the behaviour unconditional. This breaks
coloring of uppercase files that should have a different color from
lowercase files, for example .C which is a c++ source file, not a c
source file. And as mentioned in [1] it is also very useful to notice
incorrectly (eg uppercase extension files) quickly by them being
white, so you can fix them.

I'm not sure if the suggestion in this bug (33123) is good though;
since ls --color=auto-case will just error on older releases, you
can't easily sync your aliases. Unfortunately ls also ignores all of
LS_COLORS if it contains any unknown values (why??) so we can't add a
"CS" field there for case sensitiveness either (unless there's some
extra options field already I don't know about?).

If anyone has some ideas I would be happy to produce a patch (assuming
you don't need copyright assignment).

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9086
[2] https://lists.gnu.org/archive/html/coreutils/2018-06/msg00011.html

-- 
Mikael Magnusson




This bug report was last modified 2 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.